Reload section secrets.yml not working

I used config / secrets.yml in the rails application.

I have added some api keys. and then run rails c, then run the following to get the values ​​of the secrets:

Rails.application.secrets

But I find the old values ​​in the file secrets.yml.

Example:

My old values ​​in secrets.ymlwere:

development:
   secret_key_base: 3b7cd727ee24e8444053437c36cc66c3
   email_password: 'old@password'

Then I added the following values ​​as the following:

development:
   secret_key_base: 3b7cd727ee24e8444053437c36cc66c3
   email_password: 'old@password'
   admin_password: 'admin@password'

Then run Rails.application.secrets, exit:

{:secret_key_base=>"3b7cd727ee24e8444053437c36cc66c3", :email_password=>"old@password"}

No attribute admin_password.

How can I reload a file secrets.ymlto update the value of secrets? or How to update the configuration of rails applications to download a file secrets.ymlwhen you restart the rails server and console?

+4
1

@FabKremer .

. spring :

bin/spring stop

. .

+4

Source: https://habr.com/ru/post/1615146/


All Articles