Reputation: 9647
I've install devise gem
by adding it to gemfile and typing bundle
Then I type
rails generate devise admin
I can't have devise named users cause I already have users. So get an error
NoMethodError: undefined method `devise' for Admin (call 'Admin.connection' to establish a connection):Class
/home/direwolf/rails_projects/unicom/app/models/admin.rb:4:in `<class:Admin>'
/home/direwolf/rails_projects/unicom/app/models/admin.rb:1:in `<top (required)>'
/home/direwolf/rails_projects/unicom/config/routes.rb:2:in `block in <top (required)>'
/home/direwolf/rails_projects/unicom/config/routes.rb:1:in `<top (required)>'
What do I do?
Upvotes: 1
Views: 1260
Reputation: 1279
You've forgotten to run the generator command:
rails generate devise:install
This will load all of Devises configuration options.
Upvotes: 1