DEPRECATION WARNING in rails 4

629 views Asked by At

My Rails version is Rails 4.0.13

I have my secret key in config/initializers/secret_token.rb, so I am not sure why it is still throwing this error.

DEPRECATION WARNING: You didn't set config.secret_key_base. Read the upgrade documentation to learn more about this new config option

1

There are 1 answers

0
ML. On BEST ANSWER

In my secret_token.rb file, I changed the following:

API::Application.config.secret_key_base = ENV['SECRET_KEY']

to

API::Application.config.secret_key_base = 'SECRET_KEY'

and this seemed to fix the issue when I run it.