1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00

Expand explanation of how to set secrets.yml. [ci skip]

This commit is contained in:
Adrien Lamothe 2014-04-08 17:59:14 -07:00
parent 30a41e76f6
commit a4e5587236

View file

@ -79,12 +79,15 @@ secrets, you need to:
secret_key_base:
production:
secret_key_base:
secret_key_base: <%= ENV["SECRET_KEY_BASE"] %>
```
2. Copy the existing `secret_key_base` from the `secret_token.rb` initializer to
`secrets.yml` under the `production` section.
2. Use your existing `secret_key_base` from the `secret_token.rb` initializer to
set the SECRET_KEY_BASE environment variable for whichever users run the Rails
app in production mode. Alternately, you can simply copy the existing
`secret_key_base` from the `secret_token.rb` initializer to `secrets.yml`
under the `production` section, replacing '<%= ENV["SECRET_KEY_BASE"] %>'.
3. Remove the `secret_token.rb` initializer.
4. Use `rake secret` to generate new keys for the `development` and `test` sections.