I used config/secrets.yml in rails application.
I added some api keys. and then run rails c
, then run the following to get secrets values:
Rails.application.secrets
But I find the old values in secrets.yml
file.
Example:
My old values in secrets.yml
was:
development:
secret_key_base: 3b7cd727ee24e8444053437c36cc66c3
email_password: 'old@password'
Then I added the following values to be as the following:
development:
secret_key_base: 3b7cd727ee24e8444053437c36cc66c3
email_password: 'old@password'
admin_password: 'admin@password'
Then run Rails.application.secrets
, the output is:
{:secret_key_base=>"3b7cd727ee24e8444053437c36cc66c3", :email_password=>"old@password"}
Without the attribute admin_password
.
How can I reload the secrets.yml
file to update the secrets value ?
or How I update rails application configration to load the secrets.yml
file when restart server, and rails console ?
I post this answer depend on @FabKremer comment on question.
To solve this issue.I needed to reload the spring server by the following:
bin/spring stop
For more details, read this answer.
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