chamber: undefined method `env' for Chamber:Module - Rails 6
Current Behavior
Trying to use Chamber in a Rails initializer and the Rails application will not boot.
2: from /Users/patrickveverka/Code/personal/blah/config/application.rb:9:in `<main>'
1: from /Users/patrickveverka/Code/personal/blah/config/application.rb:11:in `<module:Blah>'
/Users/patrickveverka/Code/personal/blah/config/application.rb:14:in `<class:Application>': private method `load' called for Chamber:Module (NoMethodError)
Steps to Reproduce
- Create a new Rails app (rails new blah)
- Add
gem "chamber"to Gemfile - bundle install
- Add call to
Chamber.env.settingin an initializer - Run local server
rails s - App go boom
Expected Behavior
I thought that the chamber secrets would be available in initializers (devise, mailer, etc)
Environment
-
OS:
- Windows
- macOS
- iOS
- Android
- Linux
- Other
-
OS Version: 10.15.6 (Catalina)
I made an example app at https://github.com/veverkap/chamber_error that shows the error at boot. I included the private keys in the repo but will destroy it later.
About this issue
- Original URL
- State: closed
- Created 4 years ago
- Comments: 21
Worked on this a bit but didn’t quite get there, but I’m on it.
chamber2.14.0has been released: https://rubygems.org/gems/chamber/versions/2.14.0Also sorry it took so long for me to see this!