Using dry-system's settings raises am undefined method `env' for Dry::Configurable::Config exception
Szeliga opened this issue · comments
Describe the bug
Trying to define settings
from dry-system (https://dry-rb.org/gems/dry-system/0.17/settings/) using config/system/boot
raises an exception:
dry-configurable-0.11.5/lib/dry/configurable/config.rb:106:in `method_missing': undefined method `env' for #<Dry::Configurable::Config:0x00005599da1e52e8>
To Reproduce
https://github.com/Szeliga/dry-rails-test this repo implements a basic app
https://github.com/Szeliga/dry-rails-test/blob/master/config/initializers/system.rb types module definition
https://github.com/Szeliga/dry-rails-test/blob/master/config/system/boot/settings.rb settings component setup
Running rails c
reproduces the error
Expected behavior
It should not raise an exception and create an importable settings component
Your environment
- Affects my production application: NO
- Ruby version: 2.7.1
- OS: Linux 5.5.13-arch2-1
Thanks for the report. Your test repo is either gone or private. Could you make sure that I can access it?
@solnic yep, it was private, sorry about that