jeudi 18 octobre 2018

RailsConfig gem not working as expected in development environment

I have the following setup:

app_dir/config/settings/development.yml dev_setting_1: "hello_dev"

app_dir/config/settings/production.yml prod_setting_1: "hello_prod"

app_dir/config/settings.yml gen_setting_1: "hello_world"

app_dir/config/settings.local.yml local_setting_1: "hello_local"

When I run production env

DISABLE_SPRING=true rails c production

Settings.reload!

Settings.keys

I get expected results:

[:local_setting_1:, gen_setting_1, :prod_setting_1]

HOWEVER

When I run development env DISABLE_SPRING=true rails c development

Settings.reload!

Settings.keys

I only get keys for .local.yml files [:local_setting_1]

I would have expected

[:local_setting_1:, gen_setting_1, :dev_setting_1]

Any thoughts would be much appreciated

I'm running Rails 5.0.6 on a Mac

Aucun commentaire:

Enregistrer un commentaire