Ruby on Rails Sunday, March 8, 2015

Hi John,

This documentation explains how to create secrets.yml. 

http://guides.rubyonrails.org/upgrading_ruby_on_rails.html#spring

Just create secrets.yml in app/config and copy the value from app/config/initializers/secret_token.rb.

GT

On Saturday, February 28, 2015 at 6:14:58 AM UTC-10, John Plato wrote:
I also posted this on StackExchange: http://stackoverflow.com/questions/28767059/does-rails-4-2-use-secret-token

Are both secret_key_base and secret_token needed for production in Rails 4.2? Setting neither causes the following exception message:

Missing secret_token and secret_key_base for 'production' environment, set these values in config/secrets.yml

The 4.2 upgrade guide (http://railsapps.github.io/updating-rails.html) says this:

When you create a new Rails application using the rails new command, a unique secret key is generated and written to the config/initializers/secret_token.rb file.

But no such file was created when I generated my app, and there is no reference to secret_token in config/secrets.yml

I'm assuming that the error message is wrong, and that only secret_key_base is needed. When I run my app in production on my dev machine, it starts with just secret_key_base, but in Engineyard, setting secret_key_base (via an environment variable) isn't working. I still get the error.

--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscribe@googlegroups.com.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/7ea081ad-d2c2-4469-b661-25b0980b19a6%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

No comments:

Post a Comment