Ruby on Rails Devise Error: no secure_key

Anishka Jitendrabhai Vaghani

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.

Ajay

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.

edited at
0

Comments

0 comments
Login to comment

Related

From Dev

Ruby on Rails Devise Edit Registration Routing Error

From Dev

Ruby On Rails Devise gem conflict error

From Dev

Rails minitest devise error

From Dev

Facebook OAuth with Devise in Ruby on Rails

From Dev

Ruby on Rails: Getting a route with Devise

From Dev

Ruby on Rails devise password override

From Dev

Devise primary key error on postgresql, heroku, Rails 4

From Dev

Rails devise error "NoMethodError ... merge"

From Dev

Can't add custom fields to Devise model in Ruby on Rails. Private method error

From Dev

Rails 4.1, Ruby 2.1, Devise, Why 'syntax error, unexpected tConstant' in my .where() with multiple conditions?

From Dev

Argument Error (wrong number of Arguments) in Ruby on Rails duing integration of Devise and PostageApp

From Dev

Rails 4.1, Ruby 2.1, Devise, Why 'syntax error, unexpected tConstant' in my .where() with multiple conditions?

From Dev

Ruby on Rails Devise Confirmation Token is nil

From Java

Register with a username using Ruby on Rails Devise Gem

From Dev

Ruby on Rails 4 authentication, devise vs bcrypt

From Dev

Ruby on Rails 4, Devise, and profile pages

From Dev

Ruby on Rails Devise - Cannot Log Out

From Dev

Create session with Devise in web API on ruby on rails

From Dev

Edit other user as admin in devise, ruby on rails

From Dev

Using ldap to connect to ad with devise ruby on rails

From Dev

Ruby on Rails devise return role of user

From Dev

Ruby on Rails Devise - Cannot Log Out

From Dev

Using ldap to connect to ad with devise ruby on rails

From Dev

Equivalent of Devise (Ruby on Rails) in Spring MVC?

From Dev

Devise gives error while running devise:install in rails application

From Java

Is this Rails JSON authentication API (using Devise) secure?

From Dev

Is this Rails JSON authentication API (using Devise) secure?

From Dev

Rails 4 Paperclip with Devise, file saving error

From Dev

Devise raises error with Rails 4.2 upgrade

Related Related

  1. 1

    Ruby on Rails Devise Edit Registration Routing Error

  2. 2

    Ruby On Rails Devise gem conflict error

  3. 3

    Rails minitest devise error

  4. 4

    Facebook OAuth with Devise in Ruby on Rails

  5. 5

    Ruby on Rails: Getting a route with Devise

  6. 6

    Ruby on Rails devise password override

  7. 7

    Devise primary key error on postgresql, heroku, Rails 4

  8. 8

    Rails devise error "NoMethodError ... merge"

  9. 9

    Can't add custom fields to Devise model in Ruby on Rails. Private method error

  10. 10

    Rails 4.1, Ruby 2.1, Devise, Why 'syntax error, unexpected tConstant' in my .where() with multiple conditions?

  11. 11

    Argument Error (wrong number of Arguments) in Ruby on Rails duing integration of Devise and PostageApp

  12. 12

    Rails 4.1, Ruby 2.1, Devise, Why 'syntax error, unexpected tConstant' in my .where() with multiple conditions?

  13. 13

    Ruby on Rails Devise Confirmation Token is nil

  14. 14

    Register with a username using Ruby on Rails Devise Gem

  15. 15

    Ruby on Rails 4 authentication, devise vs bcrypt

  16. 16

    Ruby on Rails 4, Devise, and profile pages

  17. 17

    Ruby on Rails Devise - Cannot Log Out

  18. 18

    Create session with Devise in web API on ruby on rails

  19. 19

    Edit other user as admin in devise, ruby on rails

  20. 20

    Using ldap to connect to ad with devise ruby on rails

  21. 21

    Ruby on Rails devise return role of user

  22. 22

    Ruby on Rails Devise - Cannot Log Out

  23. 23

    Using ldap to connect to ad with devise ruby on rails

  24. 24

    Equivalent of Devise (Ruby on Rails) in Spring MVC?

  25. 25

    Devise gives error while running devise:install in rails application

  26. 26

    Is this Rails JSON authentication API (using Devise) secure?

  27. 27

    Is this Rails JSON authentication API (using Devise) secure?

  28. 28

    Rails 4 Paperclip with Devise, file saving error

  29. 29

    Devise raises error with Rails 4.2 upgrade

HotTag

Archive