[openstreetmap/openstreetmap-website] NoMethodError: undefined method `exists?' for File:Class (Issue #4083)

Tom Hughes notifications at github.com
Tue Jul 11 11:02:01 UTC 2023


If anybody does want to hack their install you need to look at `consumer.rb` and at the top change this:

```ruby
    CA_FILES.each do |ca_file|
      if File.exists?(ca_file)
        CA_FILE = ca_file
        break
      end
    end
```

to this:

```ruby
    CA_FILES.each do |ca_file|
      if File.exist?(ca_file)
        CA_FILE = ca_file
        break
      end
    end
```

It's because it is class scope code that runs when the file is loaded that monkey patching is not really possible.

-- 
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/openstreetmap-website/issues/4083#issuecomment-1630617370
You are receiving this because you are subscribed to this thread.

Message ID: <openstreetmap/openstreetmap-website/issues/4083/1630617370 at github.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/rails-dev/attachments/20230711/8839e7ee/attachment.htm>


More information about the rails-dev mailing list