When running rails console, my call to Rails.configuration.secret_key_base
in my development environment keeps returning nil.
#secrets.yml
development:
secret_key_base: the-long-secret-generated-by-rake-secret
#...other configs, a call while running heroku rails c in production also returns nil
How can this be? Running rails 4.1.0
As noted in the documentation:
The secrets added to this file are accessible via
Rails.application.secrets
.
Running Rails.application.secrets.secret_key_base
from the console should return: the-long-secret-generated-by-rake-secret
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With