Closed jtuttle closed 3 years ago
Fortunately, I was able to fix this by setting config.anyway_config.future.unwrap_known_environments = true
in config/application.rb
. However, the README
makes it sound like this setting is just supposed to allow you to mix-and-match env with non-env rather than enabling files that are completely non-env so I think there may still be a bug here. Going to leave this open for now.
Thanks! Updated the Readme verbiage a bit.
What did you do?
The
README
says you can't mix-and-match environment and non-environment values in the config file but it seems like I should be able to have one or the other.In a Rails app, I tried to use a YAML configuration file without specifying any environments:
my_config.rb
my.yml
What did you expect to happen?
I expected
MyConfig
to read the value offoo
as"bar"
.What actually happened?
The
MyConfig
object is unable to read the value offoo
from the YAML file:Additional context
I'm able to load the value just fine if I include the Rails env in the config file, so I know it's not a mistake setting up paths or anything like that. If I change the config file as follows it works:
my.yml
but for this particular use case I don't want to have to specify environments in the config file.
Environment
Ruby Version: Ruby 2.5.8p224
Framework Version (Rails, whatever): Rails 5.2.6
Anyway Config Version: 2.1.0