I just installed devise 3.1.1 and whenever I run "rails generate devise:install" I get an error saying that "Devise.secret_key was not set. Please add the following to your Devise initializer." I checked in my "Config/initializers/" folder but there is no "devise.rb" file to edit! What should I do? please help me, I'm rails beginner and I searched everywhere but found no solution. thank you.
Move to your routes.rb
file and comment this line
#devise_for :installs
Now move to your console/CMD and re-run rails generate devise:install
if above does not fix your problem then manually change your devise gem version(in gem file) gem 'devise', '3.0.3'
and then follow the step as I mentioned above.
Collected from the Internet
Please contact [email protected] to delete if infringement.
Comments