-
-
Notifications
You must be signed in to change notification settings - Fork 234
Open
Description
Version 2.0.0
I'm trying to use the use_env
setting, but was noticing the override wasn't working. On closer inspection, it appears as if all of my settings are loaded prior to the Config.setup
block being executed. I verified this by checking it in the initializer:
Config.setup do |config|
config.const_name = 'Settings'
config.use_env = true
config.env_prefix = 'SETTINGS'
config.env_separator = '__'
config.env_converter = :downcase
config.env_parse_values = true
end
puts ENV['SETTINGS__FOO']
# => baz
puts Settings.foo
# => bar
Settings.reload!
puts Settings.foo
# => baz
Has anyone else experienced this? I don't think it's due to any special setup for my particular app, but will try to spin up an example app to test.