Rails: DEPRECATION WARNING: You didn’t set config.secret_key_base

You propably upgraded to Rails 4 from a 3.x or a previous version.

First generate a random secret key value:

$ bundle exec rake secret

Then take that value and put it in config/initializers/secret_token.rb:

YourApp::Application.config.secret_key_base="your-secret"

replacing YourApp with the name of your application.

The reason for this is explained here.

Also see http://guides.rubyonrails.org/upgrading_ruby_on_rails.html#config-secrets-yml

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)