Permalink
Browse files

Merge pull request #14654 from Alamoz/secret_key

Expand explanation of how to set secrets.yml.
  • Loading branch information...
2 parents 7cf46ad + a4e5587 commit 040a1dbb11495490ca3f7c882cda1815316e7256 @rafaelfranca rafaelfranca committed Apr 9, 2014
Showing with 7 additions and 4 deletions.
  1. +7 −4 guides/source/upgrading_ruby_on_rails.md
@@ -77,12 +77,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.

0 comments on commit 040a1db

Please sign in to comment.