I could not fine the
secret.yml
format in ruby on rails application I have created. Can anyone help and tell me how to generate a new one.
Thank before hand.
I could not fine the
secret.yml
format in ruby on rails application I have created. Can anyone help and tell me how to generate a new one.
Thank before hand.
If you don't have it generate it !!!
bundle exec rake secret
Update.
paste generated string to your config/secret.yml
development:
secret_key_base: <key>
if your rails version 5.1, this command below will generate 2 files. config/secrets.yml.key contains the key that will encrypt and decrypt your secrets
bin/rails secrets:setup
After creating the key, even though config/secrets.yml.enc is not empty, it doesn't contain any secrets. To add your secrets, run
bin/rails secrets:edit
meanwhile if your Rails version 5.2, or above replaces both secrets with encrypted credentials. You cannot use plain text credentials. There's only credentials.yml.enc. The encrypted credentials are saved on config/credentials.yml.enc. Don't edit the file directly. To add credentials, run
bin/rails credentials:edit