Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Rails upgrade undefined method `cookie_verifier_secret`

Was getting deprecation warning message in the last version.

Now I can't run the server at all, I'm getting config/initializers/cookie_verification_secret.rb:7:in <top (required)>': undefined method cookie_verifier_secret=' for ActionController::Base:Class (NoMethodError)

like image 588
Michael Durrant Avatar asked Jan 16 '23 09:01

Michael Durrant


1 Answers

The fix was to change:

config/initializers/cookie_verification_secret.rb

Changing:

ActionController::Base.cookie_verifier_secret=

to

ActionController::Base.config.secret_token=
like image 89
Michael Durrant Avatar answered Jan 26 '23 07:01

Michael Durrant