openstreetmap / openstreetmap-website

The Rails application that powers OpenStreetMap
https://www.openstreetmap.org/
GNU General Public License v2.0
2.15k stars 908 forks source link

Sprockets vs optional config files #2185

Open gravitystorm opened 5 years ago

gravitystorm commented 5 years ago

In app/assets/javascripts/osm.js.erb we need to tell sprockets to recompile the output whenever the settings change. To do this we mark that file as depending on config/settings.yml and config/settings.local.yml.

However, this throws up two problems:

I've checked through the sprockets documentation, but I can't see any obvious guidance for approaches to this situation.

Potential solutions include:

gravitystorm commented 5 years ago

For anyone who gets ActionView::Template::Error: couldn't find file 'settings.local.yml' or similar when first setting up your environment, then this issue is the root cause. You need to create an empty file in config/settings.local.yml, for example by running:

$ touch config/settings.local.yml
mmd-osm commented 2 years ago

How about: