What does this Devise error mean? - ruby-on-rails

When I try to run my rails server I get the following error (Important note: I have just pulled my code from Github to Nitrous.Io, and was starting to work on the application):
/home/action/.rvm/gems/ruby-2.0.0-p247/gems/activesupport-4.0.0/lib/active_support/inflector/methods.rb:226:in `const_get': uninitialized constant User (NameEr
ror) from /home/action/.rvm/gems/ruby-2.0.0-p247/gems/activesupport-4.0.0/lib/active_support/inflector/methods.rb:226:in `block in constantize'
from /home/action/.rvm/gems/ruby-2.0.0-p247/gems/activesupport-4.0.0/lib/active_support/inflector/methods.rb:224:in `each'
from /home/action/.rvm/gems/ruby-2.0.0-p247/gems/activesupport-4.0.0/lib/active_support/inflector/methods.rb:224:in `inject'
from /home/action/.rvm/gems/ruby-2.0.0-p247/gems/activesupport-4.0.0/lib/active_support/inflector/methods.rb:224:in `constantize'
from /home/action/.rvm/gems/ruby-2.0.0-p247/gems/devise-3.1.1/lib/devise.rb:285:in `get'
from /home/action/.rvm/gems/ruby-2.0.0-p247/gems/devise-3.1.1/lib/devise/mapping.rb:77:in `to'
from /home/action/.rvm/gems/ruby-2.0.0-p247/gems/devise-3.1.1/lib/devise/mapping.rb:72:in `modules'
from /home/action/.rvm/gems/ruby-2.0.0-p247/gems/devise-3.1.1/lib/devise/mapping.rb:89:in `routes'
from /home/action/.rvm/gems/ruby-2.0.0-p247/gems/devise-3.1.1/lib/devise/mapping.rb:156:in `default_used_route'
from /home/action/.rvm/gems/ruby-2.0.0-p247/gems/devise-3.1.1/lib/devise/mapping.rb:66:in `initialize'
from /home/action/.rvm/gems/ruby-2.0.0-p247/gems/devise-3.1.1/lib/devise.rb:319:in `new'
from /home/action/.rvm/gems/ruby-2.0.0-p247/gems/devise-3.1.1/lib/devise.rb:319:in `add_mapping'
from /home/action/.rvm/gems/ruby-2.0.0-p247/gems/devise-3.1.1/lib/devise/rails/routes.rb:210:in `block in devise_for'
from /home/action/.rvm/gems/ruby-2.0.0-p247/gems/devise-3.1.1/lib/devise/rails/routes.rb:209:in `each'
from /home/action/.rvm/gems/ruby-2.0.0-p247/gems/devise-3.1.1/lib/devise/rails/routes.rb:209:in `devise_for'
from /home/action/pinteresting/config/routes.rb:4:in `block in <top (required)>'
from /home/action/.rvm/gems/ruby-2.0.0-p247/gems/actionpack-4.0.0/lib/action_dispatch/routing/route_set.rb:316:in `instance_exec'
from /home/action/.rvm/gems/ruby-2.0.0-p247/gems/actionpack-4.0.0/lib/action_dispatch/routing/route_set.rb:316:in `eval_block'
from /home/action/.rvm/gems/ruby-2.0.0-p247/gems/actionpack-4.0.0/lib/action_dispatch/routing/route_set.rb:294:in `draw'
from /home/action/pinteresting/config/routes.rb:1:in `<top (required)>'
from /home/action/.rvm/gems/ruby-2.0.0-p247/gems/railties-4.0.0/lib/rails/application/routes_reloader.rb:40:in `block in load_paths'
from /home/action/.rvm/gems/ruby-2.0.0-p247/gems/railties-4.0.0/lib/rails/application/routes_reloader.rb:40:in `each'
from /home/action/.rvm/gems/ruby-2.0.0-p247/gems/railties-4.0.0/lib/rails/application/routes_reloader.rb:40:in `load_paths'
from /home/action/.rvm/gems/ruby-2.0.0-p247/gems/railties-4.0.0/lib/rails/application/routes_reloader.rb:16:in `reload!'
from /home/action/.rvm/gems/ruby-2.0.0-p247/gems/railties-4.0.0/lib/rails/application/routes_reloader.rb:26:in `block in updater'
from /home/action/.rvm/gems/ruby-2.0.0-p247/gems/activesupport-4.0.0/lib/active_support/file_update_checker.rb:75:in `call'
from /home/action/.rvm/gems/ruby-2.0.0-p247/gems/activesupport-4.0.0/lib/active_support/file_update_checker.rb:75:in `execute'
from /home/action/.rvm/gems/ruby-2.0.0-p247/gems/railties-4.0.0/lib/rails/application/routes_reloader.rb:27:in `updater'
from /home/action/.rvm/gems/ruby-2.0.0-p247/gems/railties-4.0.0/lib/rails/application/routes_reloader.rb:6:in `execute_if_updated'
from /home/action/.rvm/gems/ruby-2.0.0-p247/gems/railties-4.0.0/lib/rails/application/finisher.rb:69:in `block in <module:Finisher>'
from /home/action/.rvm/gems/ruby-2.0.0-p247/gems/railties-4.0.0/lib/rails/initializable.rb:30:in `instance_exec'
from /home/action/.rvm/gems/ruby-2.0.0-p247/gems/railties-4.0.0/lib/rails/initializable.rb:30:in `run'
from /home/action/.rvm/gems/ruby-2.0.0-p247/gems/railties-4.0.0/lib/rails/initializable.rb:55:in `block in run_initializers'
from /home/action/.rvm/rubies/ruby-2.0.0-p247/lib/ruby/2.0.0/tsort.rb:150:in `block in tsort_each'
from /home/action/.rvm/rubies/ruby-2.0.0-p247/lib/ruby/2.0.0/tsort.rb:183:in `block (2 levels) in each_strongly_connected_component'
from /home/action/.rvm/rubies/ruby-2.0.0-p247/lib/ruby/2.0.0/tsort.rb:219:in `each_strongly_connected_component_from'
from /home/action/.rvm/rubies/ruby-2.0.0-p247/lib/ruby/2.0.0/tsort.rb:182:in `block in each_strongly_connected_component'
from /home/action/.rvm/rubies/ruby-2.0.0-p247/lib/ruby/2.0.0/tsort.rb:180:in `each'
from /home/action/.rvm/rubies/ruby-2.0.0-p247/lib/ruby/2.0.0/tsort.rb:180:in `each_strongly_connected_component'
from /home/action/.rvm/rubies/ruby-2.0.0-p247/lib/ruby/2.0.0/tsort.rb:148:in `tsort_each'
from /home/action/.rvm/gems/ruby-2.0.0-p247/gems/railties-4.0.0/lib/rails/initializable.rb:54:in `run_initializers'
from /home/action/.rvm/gems/ruby-2.0.0-p247/gems/railties-4.0.0/lib/rails/application.rb:215:in `initialize!'
from /home/action/.rvm/gems/ruby-2.0.0-p247/gems/railties-4.0.0/lib/rails/railtie/configurable.rb:30:in `method_missing'
from /home/action/pinteresting/config/environment.rb:5:in `<top (required)>'
from /home/action/.rvm/gems/ruby-2.0.0-p247/gems/railties-4.0.0/lib/rails/application.rb:189:in `require_environment!'
from /home/action/.rvm/gems/ruby-2.0.0-p247/gems/railties-4.0.0/lib/rails/commands.rb:45:in `<top (required)>'
from bin/rails:4:in `require'
from bin/rails:4:in `<main>'

Looks like your database hasn't yet been created.
The most likely solution would be to run rake db:migrate if you're using sqlite, though if you're using Postgres or Mysql on Nitrous, you'll need to install them first. There is a guide to what's available here http://help.nitrous.io/categories/databases/

Related

mandrill-mailer with sidekiq 5.0.4 uninitialized constant Sidekiq::Extensions::ActionMailer

I've juste updated the sidekiq gem to 5.0.4, and now I have this error when I run my server.
NameError: uninitialized constant Sidekiq::Extensions::ActionMailer
/Users/mike/Documents/paycar/back_end/config/initializers/mail.rb:15:in `<top (required)>'
/Users/mike/.rvm/gems/ruby-2.3.1#paycar-api/gems/railties-4.2.7.1/lib/rails/engine.rb:652:in `block in load_config_initializer'
/Users/mike/.rvm/gems/ruby-2.3.1#paycar-api/gems/activesupport-4.2.7.1/lib/active_support/notifications.rb:166:in `instrument'
/Users/mike/.rvm/gems/ruby-2.3.1#paycar-api/gems/railties-4.2.7.1/lib/rails/engine.rb:651:in `load_config_initializer'
/Users/mike/.rvm/gems/ruby-2.3.1#paycar-api/gems/railties-4.2.7.1/lib/rails/engine.rb:616:in `block (2 levels) in <class:Engine>'
/Users/mike/.rvm/gems/ruby-2.3.1#paycar-api/gems/railties-4.2.7.1/lib/rails/engine.rb:615:in `each'
/Users/mike/.rvm/gems/ruby-2.3.1#paycar-api/gems/railties-4.2.7.1/lib/rails/engine.rb:615:in `block in <class:Engine>'
/Users/mike/.rvm/gems/ruby-2.3.1#paycar-api/gems/railties-4.2.7.1/lib/rails/initializable.rb:30:in `instance_exec'
/Users/mike/.rvm/gems/ruby-2.3.1#paycar-api/gems/railties-4.2.7.1/lib/rails/initializable.rb:30:in `run'
/Users/mike/.rvm/gems/ruby-2.3.1#paycar-api/gems/railties-4.2.7.1/lib/rails/initializable.rb:55:in `block in run_initializers'
/Users/mike/.rvm/rubies/ruby-2.3.1/lib/ruby/2.3.0/tsort.rb:228:in `block in tsort_each'
/Users/mike/.rvm/rubies/ruby-2.3.1/lib/ruby/2.3.0/tsort.rb:350:in `block (2 levels) in each_strongly_connected_component'
/Users/mike/.rvm/rubies/ruby-2.3.1/lib/ruby/2.3.0/tsort.rb:422:in `block (2 levels) in each_strongly_connected_component_from'
/Users/mike/.rvm/rubies/ruby-2.3.1/lib/ruby/2.3.0/tsort.rb:431:in `each_strongly_connected_component_from'
/Users/mike/.rvm/rubies/ruby-2.3.1/lib/ruby/2.3.0/tsort.rb:421:in `block in each_strongly_connected_component_from'
/Users/mike/.rvm/gems/ruby-2.3.1#paycar-api/gems/railties-4.2.7.1/lib/rails/initializable.rb:44:in `each'
/Users/mike/.rvm/gems/ruby-2.3.1#paycar-api/gems/railties-4.2.7.1/lib/rails/initializable.rb:44:in `tsort_each_child'
/Users/mike/.rvm/rubies/ruby-2.3.1/lib/ruby/2.3.0/tsort.rb:415:in `call'
/Users/mike/.rvm/rubies/ruby-2.3.1/lib/ruby/2.3.0/tsort.rb:415:in `each_strongly_connected_component_from'
/Users/mike/.rvm/rubies/ruby-2.3.1/lib/ruby/2.3.0/tsort.rb:349:in `block in each_strongly_connected_component'
/Users/mike/.rvm/rubies/ruby-2.3.1/lib/ruby/2.3.0/tsort.rb:347:in `each'
/Users/mike/.rvm/rubies/ruby-2.3.1/lib/ruby/2.3.0/tsort.rb:347:in `call'
/Users/mike/.rvm/rubies/ruby-2.3.1/lib/ruby/2.3.0/tsort.rb:347:in `each_strongly_connected_component'
/Users/mike/.rvm/rubies/ruby-2.3.1/lib/ruby/2.3.0/tsort.rb:226:in `tsort_each'
/Users/mike/.rvm/rubies/ruby-2.3.1/lib/ruby/2.3.0/tsort.rb:205:in `tsort_each'
/Users/mike/.rvm/gems/ruby-2.3.1#paycar-api/gems/railties-4.2.7.1/lib/rails/initializable.rb:54:in `run_initializers'
/Users/mike/.rvm/gems/ruby-2.3.1#paycar-api/gems/railties-4.2.7.1/lib/rails/application.rb:352:in `initialize!'
/Users/mike/Documents/paycar/back_end/config/environment.rb:6:in `<top (required)>'
/Users/mike/Documents/paycar/back_end/spec/rails_helper.rb:5:in `require'
/Users/mike/Documents/paycar/back_end/spec/rails_helper.rb:5:in `<top (required)>'
/Users/mike/Documents/paycar/back_end/spec/controllers/api/csrf_controller_spec.rb:2:in `require'
/Users/mike/Documents/paycar/back_end/spec/controllers/api/csrf_controller_spec.rb:2:in `<top (required)>'
/Users/mike/.rvm/gems/ruby-2.3.1#paycar-api/gems/rspec-core-3.2.3/lib/rspec/core/configuration.rb:1226:in `load'
/Users/mike/.rvm/gems/ruby-2.3.1#paycar-api/gems/rspec-core-3.2.3/lib/rspec/core/configuration.rb:1226:in `block in load_spec_files'
/Users/mike/.rvm/gems/ruby-2.3.1#paycar-api/gems/rspec-core-3.2.3/lib/rspec/core/configuration.rb:1224:in `each'
/Users/mike/.rvm/gems/ruby-2.3.1#paycar-api/gems/rspec-core-3.2.3/lib/rspec/core/configuration.rb:1224:in `load_spec_files'
/Users/mike/.rvm/gems/ruby-2.3.1#paycar-api/gems/rspec-core-3.2.3/lib/rspec/core/runner.rb:97:in `setup'
/Users/mike/.rvm/gems/ruby-2.3.1#paycar-api/gems/rspec-core-3.2.3/lib/rspec/core/runner.rb:85:in `run'
/Users/mike/.rvm/gems/ruby-2.3.1#paycar-api/gems/rspec-core-3.2.3/lib/rspec/core/runner.rb:70:in `run'
/Users/mike/.rvm/gems/ruby-2.3.1#paycar-api/gems/rspec-core-3.2.3/lib/rspec/core/runner.rb:38:in `invoke'
/Users/mike/.rvm/gems/ruby-2.3.1#paycar-api/gems/rspec-core-3.2.3/exe/rspec:4:in `<top (required)>'
/Users/mike/.rvm/gems/ruby-2.3.1#paycar-api/bin/rspec:22:in `load'
/Users/mike/.rvm/gems/ruby-2.3.1#paycar-api/bin/rspec:22:in `<top (required)>'
now line 15 in mail.rb is this
::MandrillMailer::TemplateMailer.extend(Sidekiq::Extensions::ActionMailer)
I've tried adding config.eager_loading = true and also tried to add the classes config.autoload_paths but that didn't help.
Any help would be greatly appreciated.
It might be a file ordering thing. You can see that Sidekiq::Extensions::ActionMailer is defined at https://github.com/mperham/sidekiq/blob/master/lib/sidekiq/extensions/action_mailer.rb. Perhaps try adding a require 'sidekiq/extensions/action_mailer' line at the top?
See "The Delayed Extensions..."
https://github.com/mperham/sidekiq/blob/master/5.0-Upgrade.md#whats-new

Devise error in basic setup stage

I have used Devise a million times, but I have never had this issue. I have placed the gem in my gem file. I did 'bundle install' then I typed ' rails generate devise:install' and I get this error:
/Users/johnseabolt/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/activesupport-5.0.2/lib/active_support/inflector/methods.rb:268:in `const_get': uninitialized constant User (NameError)
from /Users/johnseabolt/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/activesupport-5.0.2/lib/active_support/inflector/methods.rb:268:in `block in constantize'
from /Users/johnseabolt/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/activesupport-5.0.2/lib/active_support/inflector/methods.rb:266:in `each'
from /Users/johnseabolt/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/activesupport-5.0.2/lib/active_support/inflector/methods.rb:266:in `inject'
from /Users/johnseabolt/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/activesupport-5.0.2/lib/active_support/inflector/methods.rb:266:in `constantize'
from /Users/johnseabolt/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/devise-4.2.1/lib/devise.rb:305:in `get'
from /Users/johnseabolt/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/devise-4.2.1/lib/devise/mapping.rb:81:in `to'
from /Users/johnseabolt/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/devise-4.2.1/lib/devise/mapping.rb:76:in `modules'
from /Users/johnseabolt/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/devise-4.2.1/lib/devise/mapping.rb:93:in `routes'
from /Users/johnseabolt/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/devise-4.2.1/lib/devise/mapping.rb:160:in `default_used_route'
from /Users/johnseabolt/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/devise-4.2.1/lib/devise/mapping.rb:70:in `initialize'
from /Users/johnseabolt/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/devise-4.2.1/lib/devise.rb:335:in `new'
from /Users/johnseabolt/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/devise-4.2.1/lib/devise.rb:335:in `add_mapping'
from /Users/johnseabolt/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/devise-4.2.1/lib/devise/rails/routes.rb:241:in `block in devise_for'
from /Users/johnseabolt/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/devise-4.2.1/lib/devise/rails/routes.rb:240:in `each'
from /Users/johnseabolt/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/devise-4.2.1/lib/devise/rails/routes.rb:240:in `devise_for'
from /Users/johnseabolt/Desktop/2. Projects/ReactBlog/config/routes.rb:2:in `block in <top (required)>'
from /Users/johnseabolt/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/actionpack-5.0.2/lib/action_dispatch/routing/route_set.rb:389:in `instance_exec'
from /Users/johnseabolt/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/actionpack-5.0.2/lib/action_dispatch/routing/route_set.rb:389:in `eval_block'
from /Users/johnseabolt/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/actionpack-5.0.2/lib/action_dispatch/routing/route_set.rb:371:in `draw'
from /Users/johnseabolt/Desktop/2. Projects/ReactBlog/config/routes.rb:1:in `<top (required)>'
from /Users/johnseabolt/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/railties-5.0.2/lib/rails/application/routes_reloader.rb:40:in `block in load_paths'
from /Users/johnseabolt/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/railties-5.0.2/lib/rails/application/routes_reloader.rb:40:in `each'
from /Users/johnseabolt/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/railties-5.0.2/lib/rails/application/routes_reloader.rb:40:in `load_paths'
from /Users/johnseabolt/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/railties-5.0.2/lib/rails/application/routes_reloader.rb:16:in `reload!'
from /Users/johnseabolt/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/railties-5.0.2/lib/rails/application/routes_reloader.rb:26:in `block in updater'
from /Users/johnseabolt/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/activesupport-5.0.2/lib/active_support/file_update_checker.rb:77:in `execute'
from /Users/johnseabolt/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/railties-5.0.2/lib/rails/application/routes_reloader.rb:27:in `updater'
from /Users/johnseabolt/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/railties-5.0.2/lib/rails/application/routes_reloader.rb:7:in `execute_if_updated'
from /Users/johnseabolt/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/railties-5.0.2/lib/rails/application/finisher.rb:119:in `block in <module:Finisher>'
from /Users/johnseabolt/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/railties-5.0.2/lib/rails/initializable.rb:30:in `instance_exec'
from /Users/johnseabolt/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/railties-5.0.2/lib/rails/initializable.rb:30:in `run'
from /Users/johnseabolt/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/railties-5.0.2/lib/rails/initializable.rb:55:in `block in run_initializers'
from /Users/johnseabolt/.rbenv/versions/2.3.1/lib/ruby/2.3.0/tsort.rb:228:in `block in tsort_each'
from /Users/johnseabolt/.rbenv/versions/2.3.1/lib/ruby/2.3.0/tsort.rb:350:in `block (2 levels) in each_strongly_connected_component'
from /Users/johnseabolt/.rbenv/versions/2.3.1/lib/ruby/2.3.0/tsort.rb:431:in `each_strongly_connected_component_from'
from /Users/johnseabolt/.rbenv/versions/2.3.1/lib/ruby/2.3.0/tsort.rb:349:in `block in each_strongly_connected_component'
from /Users/johnseabolt/.rbenv/versions/2.3.1/lib/ruby/2.3.0/tsort.rb:347:in `each'
from /Users/johnseabolt/.rbenv/versions/2.3.1/lib/ruby/2.3.0/tsort.rb:347:in `call'
from /Users/johnseabolt/.rbenv/versions/2.3.1/lib/ruby/2.3.0/tsort.rb:347:in `each_strongly_connected_component'
from /Users/johnseabolt/.rbenv/versions/2.3.1/lib/ruby/2.3.0/tsort.rb:226:in `tsort_each'
from /Users/johnseabolt/.rbenv/versions/2.3.1/lib/ruby/2.3.0/tsort.rb:205:in `tsort_each'
from /Users/johnseabolt/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/railties-5.0.2/lib/rails/initializable.rb:54:in `run_initializers'
from /Users/johnseabolt/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/railties-5.0.2/lib/rails/application.rb:352:in `initialize!'
from /Users/johnseabolt/Desktop/2. Projects/ReactBlog/config/environment.rb:5:in `<top (required)>'
from /Users/johnseabolt/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/spring-2.0.1/lib/spring/application.rb:92:in `preload'
from /Users/johnseabolt/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/spring-2.0.1/lib/spring/application.rb:143:in `serve'
from /Users/johnseabolt/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/spring-2.0.1/lib/spring/application.rb:131:in `block in run'
from /Users/johnseabolt/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/spring-2.0.1/lib/spring/application.rb:125:in `loop'
from /Users/johnseabolt/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/spring-2.0.1/lib/spring/application.rb:125:in `run'
from /Users/johnseabolt/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/spring-2.0.1/lib/spring/application/boot.rb:19:in `<top (required)>'
from /Users/johnseabolt/.rbenv/versions/2.3.1/lib/ruby/site_ruby/2.3.0/rubygems/core_ext/kernel_require.rb:55:in `require'
from /Users/johnseabolt/.rbenv/versions/2.3.1/lib/ruby/site_ruby/2.3.0/rubygems/core_ext/kernel_require.rb:55:in `require'
from -e:1:in `<main>'
I previously had gotten past this step, but I was turning around and trying it again. I had already run 'rails generate devise User,' but had received an error. If I run that same command again, I get this:
/Users/johnseabolt/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/activesupport-5.0.2/lib/active_support/inflector/methods.rb:268:in `const_get': uninitialized constant User (NameError)
from /Users/johnseabolt/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/activesupport-5.0.2/lib/active_support/inflector/methods.rb:268:in `block in constantize'
from /Users/johnseabolt/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/activesupport-5.0.2/lib/active_support/inflector/methods.rb:266:in `each'
from /Users/johnseabolt/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/activesupport-5.0.2/lib/active_support/inflector/methods.rb:266:in `inject'
from /Users/johnseabolt/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/activesupport-5.0.2/lib/active_support/inflector/methods.rb:266:in `constantize'
from /Users/johnseabolt/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/devise-4.2.1/lib/devise.rb:305:in `get'
from /Users/johnseabolt/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/devise-4.2.1/lib/devise/mapping.rb:81:in `to'
from /Users/johnseabolt/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/devise-4.2.1/lib/devise/mapping.rb:76:in `modules'
from /Users/johnseabolt/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/devise-4.2.1/lib/devise/mapping.rb:93:in `routes'
from /Users/johnseabolt/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/devise-4.2.1/lib/devise/mapping.rb:160:in `default_used_route'
from /Users/johnseabolt/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/devise-4.2.1/lib/devise/mapping.rb:70:in `initialize'
from /Users/johnseabolt/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/devise-4.2.1/lib/devise.rb:335:in `new'
from /Users/johnseabolt/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/devise-4.2.1/lib/devise.rb:335:in `add_mapping'
from /Users/johnseabolt/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/devise-4.2.1/lib/devise/rails/routes.rb:241:in `block in devise_for'
from /Users/johnseabolt/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/devise-4.2.1/lib/devise/rails/routes.rb:240:in `each'
from /Users/johnseabolt/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/devise-4.2.1/lib/devise/rails/routes.rb:240:in `devise_for'
from /Users/johnseabolt/Desktop/2. Projects/ReactBlog/config/routes.rb:2:in `block in <top (required)>'
from /Users/johnseabolt/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/actionpack-5.0.2/lib/action_dispatch/routing/route_set.rb:389:in `instance_exec'
from /Users/johnseabolt/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/actionpack-5.0.2/lib/action_dispatch/routing/route_set.rb:389:in `eval_block'
from /Users/johnseabolt/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/actionpack-5.0.2/lib/action_dispatch/routing/route_set.rb:371:in `draw'
from /Users/johnseabolt/Desktop/2. Projects/ReactBlog/config/routes.rb:1:in `<top (required)>'
from /Users/johnseabolt/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/railties-5.0.2/lib/rails/application/routes_reloader.rb:40:in `block in load_paths'
from /Users/johnseabolt/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/railties-5.0.2/lib/rails/application/routes_reloader.rb:40:in `each'
from /Users/johnseabolt/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/railties-5.0.2/lib/rails/application/routes_reloader.rb:40:in `load_paths'
from /Users/johnseabolt/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/railties-5.0.2/lib/rails/application/routes_reloader.rb:16:in `reload!'
from /Users/johnseabolt/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/railties-5.0.2/lib/rails/application/routes_reloader.rb:26:in `block in updater'
from /Users/johnseabolt/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/activesupport-5.0.2/lib/active_support/file_update_checker.rb:77:in `execute'
from /Users/johnseabolt/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/railties-5.0.2/lib/rails/application/routes_reloader.rb:27:in `updater'
from /Users/johnseabolt/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/railties-5.0.2/lib/rails/application/routes_reloader.rb:7:in `execute_if_updated'
from /Users/johnseabolt/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/railties-5.0.2/lib/rails/application/finisher.rb:119:in `block in <module:Finisher>'
from /Users/johnseabolt/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/railties-5.0.2/lib/rails/initializable.rb:30:in `instance_exec'
from /Users/johnseabolt/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/railties-5.0.2/lib/rails/initializable.rb:30:in `run'
from /Users/johnseabolt/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/railties-5.0.2/lib/rails/initializable.rb:55:in `block in run_initializers'
from /Users/johnseabolt/.rbenv/versions/2.3.1/lib/ruby/2.3.0/tsort.rb:228:in `block in tsort_each'
from /Users/johnseabolt/.rbenv/versions/2.3.1/lib/ruby/2.3.0/tsort.rb:350:in `block (2 levels) in each_strongly_connected_component'
from /Users/johnseabolt/.rbenv/versions/2.3.1/lib/ruby/2.3.0/tsort.rb:431:in `each_strongly_connected_component_from'
from /Users/johnseabolt/.rbenv/versions/2.3.1/lib/ruby/2.3.0/tsort.rb:349:in `block in each_strongly_connected_component'
from /Users/johnseabolt/.rbenv/versions/2.3.1/lib/ruby/2.3.0/tsort.rb:347:in `each'
from /Users/johnseabolt/.rbenv/versions/2.3.1/lib/ruby/2.3.0/tsort.rb:347:in `call'
from /Users/johnseabolt/.rbenv/versions/2.3.1/lib/ruby/2.3.0/tsort.rb:347:in `each_strongly_connected_component'
from /Users/johnseabolt/.rbenv/versions/2.3.1/lib/ruby/2.3.0/tsort.rb:226:in `tsort_each'
from /Users/johnseabolt/.rbenv/versions/2.3.1/lib/ruby/2.3.0/tsort.rb:205:in `tsort_each'
from /Users/johnseabolt/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/railties-5.0.2/lib/rails/initializable.rb:54:in `run_initializers'
from /Users/johnseabolt/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/railties-5.0.2/lib/rails/application.rb:352:in `initialize!'
from /Users/johnseabolt/Desktop/2. Projects/ReactBlog/config/environment.rb:5:in `<top (required)>'
from /Users/johnseabolt/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/spring-2.0.1/lib/spring/application.rb:92:in `preload'
from /Users/johnseabolt/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/spring-2.0.1/lib/spring/application.rb:143:in `serve'
from /Users/johnseabolt/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/spring-2.0.1/lib/spring/application.rb:131:in `block in run'
from /Users/johnseabolt/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/spring-2.0.1/lib/spring/application.rb:125:in `loop'
from /Users/johnseabolt/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/spring-2.0.1/lib/spring/application.rb:125:in `run'
from /Users/johnseabolt/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/spring-2.0.1/lib/spring/application/boot.rb:19:in `<top (required)>'
from /Users/johnseabolt/.rbenv/versions/2.3.1/lib/ruby/site_ruby/2.3.0/rubygems/core_ext/kernel_require.rb:55:in `require'
from /Users/johnseabolt/.rbenv/versions/2.3.1/lib/ruby/site_ruby/2.3.0/rubygems/core_ext/kernel_require.rb:55:in `require'
from -e:1:in `<main>'
Can someone help? I can't seem to get past this basic setup stage.
Your error shows you added devise_for :user in routes.rb when you haven't set it up yet, as shown here:
from /Users/johnseabolt/Desktop/2. Projects/ReactBlog/config/routes.rb:2:in `<top (required)>'
Remove devise_for :user from routes.rb, run the install generator, then add devise_for :user again if it worked out.

ruby gem devise could not generate initializer

I followed the steps on https://github.com/plataformatec/devise to install devise.
after bundle install
I tried to add initializer to my app config using:
rails generate devise:install
However, I keep getting this error:
undefined method `devise' for User (call 'User.connection' to establish a connection):Class (NoMethodError)
Stack trace:
/Users/MyUsername/.rvm/gems/ruby-2.0.0-p576/gems/activerecord-4.0.10/lib/active_record/dynamic_matchers.rb:22:in `method_missing': undefined method `devise' for User (call 'User.connection' to establish a connection):Class (NoMethodError)
from /Users/MyUsername/Documents/AppDev/Pinteresting/app/models/user.rb:4:in `<class:User>'
from /Users/MyUsername/Documents/AppDev/Pinteresting/app/models/user.rb:1:in `<top (required)>'
from /Users/MyUsername/.rvm/gems/ruby-2.0.0-p576/gems/activesupport-4.0.10/lib/active_support/dependencies.rb:424:in `load'
from /Users/MyUsername/.rvm/gems/ruby-2.0.0-p576/gems/activesupport-4.0.10/lib/active_support/dependencies.rb:424:in `block in load_file'
from /Users/MyUsername/.rvm/gems/ruby-2.0.0-p576/gems/activesupport-4.0.10/lib/active_support/dependencies.rb:616:in `new_constants_in'
from /Users/MyUsername/.rvm/gems/ruby-2.0.0-p576/gems/activesupport-4.0.10/lib/active_support/dependencies.rb:423:in `load_file'
from /Users/MyUsername/.rvm/gems/ruby-2.0.0-p576/gems/activesupport-4.0.10/lib/active_support/dependencies.rb:324:in `require_or_load'
from /Users/MyUsername/.rvm/gems/ruby-2.0.0-p576/gems/activesupport-4.0.10/lib/active_support/dependencies.rb:463:in `load_missing_constant'
from /Users/MyUsername/.rvm/gems/ruby-2.0.0-p576/gems/activesupport-4.0.10/lib/active_support/dependencies.rb:184:in `const_missing'
from /Users/MyUsername/.rvm/gems/ruby-2.0.0-p576/gems/activesupport-4.0.10/lib/active_support/inflector/methods.rb:226:in `const_get'
from /Users/MyUsername/.rvm/gems/ruby-2.0.0-p576/gems/activesupport-4.0.10/lib/active_support/inflector/methods.rb:226:in `block in constantize'
from /Users/MyUsername/.rvm/gems/ruby-2.0.0-p576/gems/activesupport-4.0.10/lib/active_support/inflector/methods.rb:224:in `each'
from /Users/MyUsername/.rvm/gems/ruby-2.0.0-p576/gems/activesupport-4.0.10/lib/active_support/inflector/methods.rb:224:in `inject'
from /Users/MyUsername/.rvm/gems/ruby-2.0.0-p576/gems/activesupport-4.0.10/lib/active_support/inflector/methods.rb:224:in `constantize'
from /Users/MyUsername/.rvm/gems/ruby-2.0.0-p576/gems/activesupport-4.0.10/lib/active_support/dependencies.rb:535:in `get'
from /Users/MyUsername/.rvm/gems/ruby-2.0.0-p576/gems/activesupport-4.0.10/lib/active_support/dependencies.rb:566:in `constantize'
from /Users/MyUsername/.rvm/gems/ruby-2.0.0-p576/gems/devise-3.4.0/lib/devise.rb:302:in `get'
from /Users/MyUsername/.rvm/gems/ruby-2.0.0-p576/gems/devise-3.4.0/lib/devise/mapping.rb:80:in `to'
from /Users/MyUsername/.rvm/gems/ruby-2.0.0-p576/gems/devise-3.4.0/lib/devise/mapping.rb:75:in `modules'
from /Users/MyUsername/.rvm/gems/ruby-2.0.0-p576/gems/devise-3.4.0/lib/devise/mapping.rb:92:in `routes'
from /Users/MyUsername/.rvm/gems/ruby-2.0.0-p576/gems/devise-3.4.0/lib/devise/mapping.rb:159:in `default_used_route'
from /Users/MyUsername/.rvm/gems/ruby-2.0.0-p576/gems/devise-3.4.0/lib/devise/mapping.rb:69:in `initialize'
from /Users/MyUsername/.rvm/gems/ruby-2.0.0-p576/gems/devise-3.4.0/lib/devise.rb:336:in `new'
from /Users/MyUsername/.rvm/gems/ruby-2.0.0-p576/gems/devise-3.4.0/lib/devise.rb:336:in `add_mapping'
from /Users/MyUsername/.rvm/gems/ruby-2.0.0-p576/gems/devise-3.4.0/lib/devise/rails/routes.rb:224:in `block in devise_for'
from /Users/MyUsername/.rvm/gems/ruby-2.0.0-p576/gems/devise-3.4.0/lib/devise/rails/routes.rb:223:in `each'
from /Users/MyUsername/.rvm/gems/ruby-2.0.0-p576/gems/devise-3.4.0/lib/devise/rails/routes.rb:223:in `devise_for'
from /Users/MyUsername/Documents/AppDev/Pinteresting/config/routes.rb:2:in `block in <top (required)>'
from /Users/MyUsername/.rvm/gems/ruby-2.0.0-p576/gems/actionpack-4.0.10/lib/action_dispatch/routing/route_set.rb:337:in `instance_exec'
from /Users/MyUsername/.rvm/gems/ruby-2.0.0-p576/gems/actionpack-4.0.10/lib/action_dispatch/routing/route_set.rb:337:in `eval_block'
from /Users/MyUsername/.rvm/gems/ruby-2.0.0-p576/gems/actionpack-4.0.10/lib/action_dispatch/routing/route_set.rb:315:in `draw'
from /Users/MyUsername/Documents/AppDev/Pinteresting/config/routes.rb:1:in `<top (required)>'
from /Users/MyUsername/.rvm/gems/ruby-2.0.0-p576/gems/activesupport-4.0.10/lib/active_support/dependencies.rb:223:in `load'
from /Users/MyUsername/.rvm/gems/ruby-2.0.0-p576/gems/activesupport-4.0.10/lib/active_support/dependencies.rb:223:in `block in load'
from /Users/MyUsername/.rvm/gems/ruby-2.0.0-p576/gems/activesupport-4.0.10/lib/active_support/dependencies.rb:214:in `load_dependency'
from /Users/MyUsername/.rvm/gems/ruby-2.0.0-p576/gems/activesupport-4.0.10/lib/active_support/dependencies.rb:223:in `load'
from /Users/MyUsername/.rvm/gems/ruby-2.0.0-p576/gems/railties-4.0.10/lib/rails/application/routes_reloader.rb:40:in `block in load_paths'
from /Users/MyUsername/.rvm/gems/ruby-2.0.0-p576/gems/railties-4.0.10/lib/rails/application/routes_reloader.rb:40:in `each'
from /Users/MyUsername/.rvm/gems/ruby-2.0.0-p576/gems/railties-4.0.10/lib/rails/application/routes_reloader.rb:40:in `load_paths'
from /Users/MyUsername/.rvm/gems/ruby-2.0.0-p576/gems/railties-4.0.10/lib/rails/application/routes_reloader.rb:16:in `reload!'
from /Users/MyUsername/.rvm/gems/ruby-2.0.0-p576/gems/railties-4.0.10/lib/rails/application/routes_reloader.rb:26:in `block in updater'
from /Users/MyUsername/.rvm/gems/ruby-2.0.0-p576/gems/activesupport-4.0.10/lib/active_support/file_update_checker.rb:75:in `call'
from /Users/MyUsername/.rvm/gems/ruby-2.0.0-p576/gems/activesupport-4.0.10/lib/active_support/file_update_checker.rb:75:in `execute'
from /Users/MyUsername/.rvm/gems/ruby-2.0.0-p576/gems/railties-4.0.10/lib/rails/application/routes_reloader.rb:27:in `updater'
from /Users/MyUsername/.rvm/gems/ruby-2.0.0-p576/gems/railties-4.0.10/lib/rails/application/routes_reloader.rb:6:in `execute_if_updated'
from /Users/MyUsername/.rvm/gems/ruby-2.0.0-p576/gems/railties-4.0.10/lib/rails/application/finisher.rb:69:in `block in <module:Finisher>'
from /Users/MyUsername/.rvm/gems/ruby-2.0.0-p576/gems/railties-4.0.10/lib/rails/initializable.rb:30:in `instance_exec'
from /Users/MyUsername/.rvm/gems/ruby-2.0.0-p576/gems/railties-4.0.10/lib/rails/initializable.rb:30:in `run'
from /Users/MyUsername/.rvm/gems/ruby-2.0.0-p576/gems/railties-4.0.10/lib/rails/initializable.rb:55:in `block in run_initializers'
from /Users/MyUsername/.rvm/rubies/ruby-2.0.0-p576/lib/ruby/2.0.0/tsort.rb:150:in `block in tsort_each'
from /Users/MyUsername/.rvm/rubies/ruby-2.0.0-p576/lib/ruby/2.0.0/tsort.rb:183:in `block (2 levels) in each_strongly_connected_component'
from /Users/MyUsername/.rvm/rubies/ruby-2.0.0-p576/lib/ruby/2.0.0/tsort.rb:219:in `each_strongly_connected_component_from'
from /Users/MyUsername/.rvm/rubies/ruby-2.0.0-p576/lib/ruby/2.0.0/tsort.rb:182:in `block in each_strongly_connected_component'
from /Users/MyUsername/.rvm/rubies/ruby-2.0.0-p576/lib/ruby/2.0.0/tsort.rb:180:in `each'
from /Users/MyUsername/.rvm/rubies/ruby-2.0.0-p576/lib/ruby/2.0.0/tsort.rb:180:in `each_strongly_connected_component'
from /Users/MyUsername/.rvm/rubies/ruby-2.0.0-p576/lib/ruby/2.0.0/tsort.rb:148:in `tsort_each'
from /Users/MyUsername/.rvm/gems/ruby-2.0.0-p576/gems/railties-4.0.10/lib/rails/initializable.rb:54:in `run_initializers'
from /Users/MyUsername/.rvm/gems/ruby-2.0.0-p576/gems/railties-4.0.10/lib/rails/application.rb:215:in `initialize!'
from /Users/MyUsername/.rvm/gems/ruby-2.0.0-p576/gems/railties-4.0.10/lib/rails/railtie/configurable.rb:30:in `method_missing'
from /Users/MyUsername/Documents/AppDev/Pinteresting/config/environment.rb:5:in `<top (required)>'
from /Users/MyUsername/.rvm/gems/ruby-2.0.0-p576/gems/activesupport-4.0.10/lib/active_support/dependencies.rb:229:in `require'
from /Users/MyUsername/.rvm/gems/ruby-2.0.0-p576/gems/activesupport-4.0.10/lib/active_support/dependencies.rb:229:in `block in require'
from /Users/MyUsername/.rvm/gems/ruby-2.0.0-p576/gems/activesupport-4.0.10/lib/active_support/dependencies.rb:214:in `load_dependency'
from /Users/MyUsername/.rvm/gems/ruby-2.0.0-p576/gems/activesupport-4.0.10/lib/active_support/dependencies.rb:229:in `require'
from /Users/MyUsername/.rvm/gems/ruby-2.0.0-p576/gems/railties-4.0.10/lib/rails/application.rb:189:in `require_environment!'
from /Users/MyUsername/.rvm/gems/ruby-2.0.0-p576/gems/railties-4.0.10/lib/rails/commands.rb:44:in `<top (required)>'
from bin/rails:4:in `require'
from bin/rails:4:in `<main>'
Okay, I figured out the problem. I guess because I previous installed devise and tried to reinstall a new version. However, devise automatically created some models for the app. I deleted those created folders/files and rerun rails generate devise:install and it worked.

Unable to install devise gem "unidentified method for install"on Rails

When I try to perform "rails generate devise:install" I get this error message:
I've tried re-installing the devise gem multiple times. This error also comes up when I try to start up my server. I'm wondering if the cause of this is from initially trying to install the devise gem with "rails generate devise install" instead of putting a colon between devise and install.
Maxs-MacBook-Air:pinteresting allecat941$ rails generate devise:install
/Users/allecat941/.rvm/gems/ruby-2.1.1/gems/activerecord-4.1.1/lib/active_record/dynamic_matchers.rb:26:in `method_missing': undefined method `devise' for Install (call 'Install.connection' to establish a connection):Class (NoMethodError)
from /Users/allecat941/pinteresting/app/models/install.rb:4:in `<class:Install>'
from /Users/allecat941/pinteresting/app/models/install.rb:1:in `<top (required)>'
from /Users/allecat941/.rvm/gems/ruby-2.1.1/gems/activesupport-4.1.1/lib/active_support/dependencies.rb:443:in `load'
from /Users/allecat941/.rvm/gems/ruby-2.1.1/gems/activesupport-4.1.1/lib/active_support/dependencies.rb:443:in `block in load_file'
from /Users/allecat941/.rvm/gems/ruby-2.1.1/gems/activesupport-4.1.1/lib/active_support/dependencies.rb:633:in `new_constants_in'
from /Users/allecat941/.rvm/gems/ruby-2.1.1/gems/activesupport-4.1.1/lib/active_support/dependencies.rb:442:in `load_file'
from /Users/allecat941/.rvm/gems/ruby-2.1.1/gems/activesupport-4.1.1/lib/active_support/dependencies.rb:342:in `require_or_load'
from /Users/allecat941/.rvm/gems/ruby-2.1.1/gems/activesupport-4.1.1/lib/active_support/dependencies.rb:480:in `load_missing_constant'
from /Users/allecat941/.rvm/gems/ruby-2.1.1/gems/activesupport-4.1.1/lib/active_support/dependencies.rb:180:in `const_missing'
from /Users/allecat941/.rvm/gems/ruby-2.1.1/gems/activesupport-4.1.1/lib/active_support/inflector/methods.rb:238:in `const_get'
from /Users/allecat941/.rvm/gems/ruby-2.1.1/gems/activesupport-4.1.1/lib/active_support/inflector/methods.rb:238:in `block in constantize'
from /Users/allecat941/.rvm/gems/ruby-2.1.1/gems/activesupport-4.1.1/lib/active_support/inflector/methods.rb:236:in `each'
from /Users/allecat941/.rvm/gems/ruby-2.1.1/gems/activesupport-4.1.1/lib/active_support/inflector/methods.rb:236:in `inject'
from /Users/allecat941/.rvm/gems/ruby-2.1.1/gems/activesupport-4.1.1/lib/active_support/inflector/methods.rb:236:in `constantize'
from /Users/allecat941/.rvm/gems/ruby-2.1.1/gems/activesupport-4.1.1/lib/active_support/dependencies.rb:552:in `get'
from /Users/allecat941/.rvm/gems/ruby-2.1.1/gems/activesupport-4.1.1/lib/active_support/dependencies.rb:583:in `constantize'
from /Users/allecat941/.rvm/gems/ruby-2.1.1/gems/devise-3.2.4/lib/devise.rb:297:in `get'
from /Users/allecat941/.rvm/gems/ruby-2.1.1/gems/devise-3.2.4/lib/devise/mapping.rb:77:in `to'
from /Users/allecat941/.rvm/gems/ruby-2.1.1/gems/devise-3.2.4/lib/devise/mapping.rb:72:in `modules'
from /Users/allecat941/.rvm/gems/ruby-2.1.1/gems/devise-3.2.4/lib/devise/mapping.rb:89:in `routes'
from /Users/allecat941/.rvm/gems/ruby-2.1.1/gems/devise-3.2.4/lib/devise/mapping.rb:156:in `default_used_route'
from /Users/allecat941/.rvm/gems/ruby-2.1.1/gems/devise-3.2.4/lib/devise/mapping.rb:66:in `initialize'
from /Users/allecat941/.rvm/gems/ruby-2.1.1/gems/devise-3.2.4/lib/devise.rb:331:in `new'
from /Users/allecat941/.rvm/gems/ruby-2.1.1/gems/devise-3.2.4/lib/devise.rb:331:in `add_mapping'
from /Users/allecat941/.rvm/gems/ruby-2.1.1/gems/devise-3.2.4/lib/devise/rails/routes.rb:221:in `block in devise_for'
from /Users/allecat941/.rvm/gems/ruby-2.1.1/gems/devise-3.2.4/lib/devise/rails/routes.rb:220:in `each'
from /Users/allecat941/.rvm/gems/ruby-2.1.1/gems/devise-3.2.4/lib/devise/rails/routes.rb:220:in `devise_for'
from /Users/allecat941/pinteresting/config/routes.rb:2:in `block in <top (required)>'
from /Users/allecat941/.rvm/gems/ruby-2.1.1/gems/actionpack-4.1.1/lib/action_dispatch/routing/route_set.rb:335:in `instance_exec'
from /Users/allecat941/.rvm/gems/ruby-2.1.1/gems/actionpack-4.1.1/lib/action_dispatch/routing/route_set.rb:335:in `eval_block'
from /Users/allecat941/.rvm/gems/ruby-2.1.1/gems/actionpack-4.1.1/lib/action_dispatch/routing/route_set.rb:313:in `draw'
from /Users/allecat941/pinteresting/config/routes.rb:1:in `<top (required)>'
from /Users/allecat941/.rvm/gems/ruby-2.1.1/gems/activesupport-4.1.1/lib/active_support/dependencies.rb:241:in `load'
from /Users/allecat941/.rvm/gems/ruby-2.1.1/gems/activesupport-4.1.1/lib/active_support/dependencies.rb:241:in `block in load'
from /Users/allecat941/.rvm/gems/ruby-2.1.1/gems/activesupport-4.1.1/lib/active_support/dependencies.rb:232:in `load_dependency'
from /Users/allecat941/.rvm/gems/ruby-2.1.1/gems/activesupport-4.1.1/lib/active_support/dependencies.rb:241:in `load'
from /Users/allecat941/.rvm/gems/ruby-2.1.1/gems/railties-4.1.1/lib/rails/application/routes_reloader.rb:40:in `block in load_paths'
from /Users/allecat941/.rvm/gems/ruby-2.1.1/gems/railties-4.1.1/lib/rails/application/routes_reloader.rb:40:in `each'
from /Users/allecat941/.rvm/gems/ruby-2.1.1/gems/railties-4.1.1/lib/rails/application/routes_reloader.rb:40:in `load_paths'
from /Users/allecat941/.rvm/gems/ruby-2.1.1/gems/railties-4.1.1/lib/rails/application/routes_reloader.rb:16:in `reload!'
from /Users/allecat941/.rvm/gems/ruby-2.1.1/gems/railties-4.1.1/lib/rails/application/routes_reloader.rb:26:in `block in updater'
from /Users/allecat941/.rvm/gems/ruby-2.1.1/gems/activesupport-4.1.1/lib/active_support/file_update_checker.rb:75:in `call'
from /Users/allecat941/.rvm/gems/ruby-2.1.1/gems/activesupport-4.1.1/lib/active_support/file_update_checker.rb:75:in `execute'
from /Users/allecat941/.rvm/gems/ruby-2.1.1/gems/railties-4.1.1/lib/rails/application/routes_reloader.rb:27:in `updater'
from /Users/allecat941/.rvm/gems/ruby-2.1.1/gems/railties-4.1.1/lib/rails/application/routes_reloader.rb:7:in `execute_if_updated'
from /Users/allecat941/.rvm/gems/ruby-2.1.1/gems/railties-4.1.1/lib/rails/application/finisher.rb:71:in `block in <module:Finisher>'
from /Users/allecat941/.rvm/gems/ruby-2.1.1/gems/railties-4.1.1/lib/rails/initializable.rb:30:in `instance_exec'
from /Users/allecat941/.rvm/gems/ruby-2.1.1/gems/railties-4.1.1/lib/rails/initializable.rb:30:in `run'
from /Users/allecat941/.rvm/gems/ruby-2.1.1/gems/railties-4.1.1/lib/rails/initializable.rb:55:in `block in run_initializers'
from /Users/allecat941/.rbenv/versions/2.0.0-p451/lib/ruby/2.0.0/tsort.rb:150:in `block in tsort_each'
from /Users/allecat941/.rbenv/versions/2.0.0-p451/lib/ruby/2.0.0/tsort.rb:183:in `block (2 levels) in each_strongly_connected_component'
from /Users/allecat941/.rbenv/versions/2.0.0-p451/lib/ruby/2.0.0/tsort.rb:219:in `each_strongly_connected_component_from'
from /Users/allecat941/.rbenv/versions/2.0.0-p451/lib/ruby/2.0.0/tsort.rb:182:in `block in each_strongly_connected_component'
from /Users/allecat941/.rbenv/versions/2.0.0-p451/lib/ruby/2.0.0/tsort.rb:180:in `each'
from /Users/allecat941/.rbenv/versions/2.0.0-p451/lib/ruby/2.0.0/tsort.rb:180:in `each_strongly_connected_component'
from /Users/allecat941/.rbenv/versions/2.0.0-p451/lib/ruby/2.0.0/tsort.rb:148:in `tsort_each'
from /Users/allecat941/.rvm/gems/ruby-2.1.1/gems/railties-4.1.1/lib/rails/initializable.rb:54:in `run_initializers'
from /Users/allecat941/.rvm/gems/ruby-2.1.1/gems/railties-4.1.1/lib/rails/application.rb:288:in `initialize!'
from /Users/allecat941/pinteresting/config/environment.rb:5:in `<top (required)>'
from /Users/allecat941/.rvm/gems/ruby-2.1.1/gems/activesupport-4.1.1/lib/active_support/dependencies.rb:247:in `require'
from /Users/allecat941/.rvm/gems/ruby-2.1.1/gems/activesupport-4.1.1/lib/active_support/dependencies.rb:247:in `block in require'
from /Users/allecat941/.rvm/gems/ruby-2.1.1/gems/activesupport-4.1.1/lib/active_support/dependencies.rb:232:in `load_dependency'
from /Users/allecat941/.rvm/gems/ruby-2.1.1/gems/activesupport-4.1.1/lib/active_support/dependencies.rb:247:in `require'
from /Users/allecat941/.rvm/gems/ruby-2.1.1/gems/spring-1.1.3/lib/spring/application.rb:92:in `preload'
from /Users/allecat941/.rvm/gems/ruby-2.1.1/gems/spring-1.1.3/lib/spring/application.rb:140:in `serve'
from /Users/allecat941/.rvm/gems/ruby-2.1.1/gems/spring-1.1.3/lib/spring/application.rb:128:in `block in run'
from /Users/allecat941/.rvm/gems/ruby-2.1.1/gems/spring-1.1.3/lib/spring/application.rb:122:in `loop'
from /Users/allecat941/.rvm/gems/ruby-2.1.1/gems/spring-1.1.3/lib/spring/application.rb:122:in `run'
from /Users/allecat941/.rvm/gems/ruby-2.1.1/gems/spring-1.1.3/lib/spring/application/boot.rb:18:in `<top (required)>'
from /Users/allecat941/.rbenv/versions/2.0.0-p451/lib/ruby/site_ruby/2.0.0/rubygems/core_ext/kernel_require.rb:55:in `require'
from /Users/allecat941/.rbenv/versions/2.0.0-p451/lib/ruby/site_ruby/2.0.0/rubygems/core_ext/kernel_require.rb:55:in `require'
from -e:1:in `<main>'
It looks like your accidental install created Install model and other files. Delete those, perhaps?
I am using the device gem and without devise install . Then use, the cmd rails g device auth in this case rails throw the error than using this method my problem is solved
extend Devise::Models
in my auth.rb files
class Auth < ApplicationRecord
extend Devise::Models
end

Rails devise generate model error

I'm trying to use 'rails generate devise model1' in rails 4, but the following error up.
> /home/p4/.rvm/gems/ruby-2.0.0-p247/gems/actionpack-4.0.0/lib/action_dispatch/routing/mapper.rb:229:in `default_controller_and_action': missing :controller (ArgumentError)
from /home/p4/.rvm/gems/ruby-2.0.0-p247/gems/actionpack-4.0.0/lib/action_dispatch/routing/mapper.rb:116:in `normalize_options!'
from /home/p4/.rvm/gems/ruby-2.0.0-p247/gems/actionpack-4.0.0/lib/action_dispatch/routing/mapper.rb:64:in `initialize'
from /home/p4/.rvm/gems/ruby-2.0.0-p247/gems/actionpack-4.0.0/lib/action_dispatch/routing/mapper.rb:1438:in `new'
from /home/p4/.rvm/gems/ruby-2.0.0-p247/gems/actionpack-4.0.0/lib/action_dispatch/routing/mapper.rb:1438:in `add_route'
from /home/p4/.rvm/gems/ruby-2.0.0-p247/gems/actionpack-4.0.0/lib/action_dispatch/routing/mapper.rb:1417:in `decomposed_match'
from /home/p4/.rvm/gems/ruby-2.0.0-p247/gems/actionpack-4.0.0/lib/action_dispatch/routing/mapper.rb:1398:in `block in match'
from /home/p4/.rvm/gems/ruby-2.0.0-p247/gems/actionpack-4.0.0/lib/action_dispatch/routing/mapper.rb:1389:in `each'
from /home/p4/.rvm/gems/ruby-2.0.0-p247/gems/actionpack-4.0.0/lib/action_dispatch/routing/mapper.rb:1389:in `match'
from /home/p4/.rvm/gems/ruby-2.0.0-p247/gems/actionpack-4.0.0/lib/action_dispatch/routing/mapper.rb:330:in `root'
from /home/p4/.rvm/gems/ruby-2.0.0-p247/gems/actionpack-4.0.0/lib/action_dispatch/routing/mapper.rb:1459:in `root'
from /home/p4/rails_tut/test_app/config/routes.rb:3:in `block in <top (required)>'
from /home/p4/.rvm/gems/ruby-2.0.0-p247/gems/actionpack-4.0.0/lib/action_dispatch/routing/route_set.rb:316:in `instance_exec'
from /home/p4/.rvm/gems/ruby-2.0.0-p247/gems/actionpack-4.0.0/lib/action_dispatch/routing/route_set.rb:316:in `eval_block'
from /home/p4/.rvm/gems/ruby-2.0.0-p247/gems/actionpack-4.0.0/lib/action_dispatch/routing/route_set.rb:294:in `draw'
from /home/p4/rails_tut/test_app/config/routes.rb:1:in `<top (required)>'
from /home/p4/.rvm/gems/ruby-2.0.0-p247/gems/activesupport-4.0.0/lib/active_support/dependencies.rb:222:in `load'
from /home/p4/.rvm/gems/ruby-2.0.0-p247/gems/activesupport-4.0.0/lib/active_support/dependencies.rb:222:in `block in load'
from /home/p4/.rvm/gems/ruby-2.0.0-p247/gems/activesupport-4.0.0/lib/active_support/dependencies.rb:213:in `load_dependency'
from /home/p4/.rvm/gems/ruby-2.0.0-p247/gems/activesupport-4.0.0/lib/active_support/dependencies.rb:222:in `load'
from /home/p4/.rvm/gems/ruby-2.0.0-p247/gems/railties-4.0.0/lib/rails/application/routes_reloader.rb:40:in `block in load_paths'
from /home/p4/.rvm/gems/ruby-2.0.0-p247/gems/railties-4.0.0/lib/rails/application/routes_reloader.rb:40:in `each'
from /home/p4/.rvm/gems/ruby-2.0.0-p247/gems/railties-4.0.0/lib/rails/application/routes_reloader.rb:40:in `load_paths'
from /home/p4/.rvm/gems/ruby-2.0.0-p247/gems/railties-4.0.0/lib/rails/application/routes_reloader.rb:16:in `reload!'
from /home/p4/.rvm/gems/ruby-2.0.0-p247/gems/railties-4.0.0/lib/rails/application/routes_reloader.rb:26:in `block in updater'
from /home/p4/.rvm/gems/ruby-2.0.0-p247/gems/activesupport-4.0.0/lib/active_support/file_update_checker.rb:75:in `call'
from /home/p4/.rvm/gems/ruby-2.0.0-p247/gems/activesupport-4.0.0/lib/active_support/file_update_checker.rb:75:in `execute'
from /home/p4/.rvm/gems/ruby-2.0.0-p247/gems/railties-4.0.0/lib/rails/application/routes_reloader.rb:27:in `updater'
from /home/p4/.rvm/gems/ruby-2.0.0-p247/gems/railties-4.0.0/lib/rails/application/routes_reloader.rb:6:in `execute_if_updated'
from /home/p4/.rvm/gems/ruby-2.0.0-p247/gems/railties-4.0.0/lib/rails/application/finisher.rb:69:in `block in <module:Finisher>'
from /home/p4/.rvm/gems/ruby-2.0.0-p247/gems/railties-4.0.0/lib/rails/initializable.rb:30:in `instance_exec'
from /home/p4/.rvm/gems/ruby-2.0.0-p247/gems/railties-4.0.0/lib/rails/initializable.rb:30:in `run'
from /home/p4/.rvm/gems/ruby-2.0.0-p247/gems/railties-4.0.0/lib/rails/initializable.rb:55:in `block in run_initializers'
from /home/p4/.rvm/rubies/ruby-2.0.0-p247/lib/ruby/2.0.0/tsort.rb:150:in `block in tsort_each'
from /home/p4/.rvm/rubies/ruby-2.0.0-p247/lib/ruby/2.0.0/tsort.rb:183:in `block (2 levels) in each_strongly_connected_component'
from /home/p4/.rvm/rubies/ruby-2.0.0-p247/lib/ruby/2.0.0/tsort.rb:219:in `each_strongly_connected_component_from'
from /home/p4/.rvm/rubies/ruby-2.0.0-p247/lib/ruby/2.0.0/tsort.rb:182:in `block in each_strongly_connected_component'
from /home/p4/.rvm/rubies/ruby-2.0.0-p247/lib/ruby/2.0.0/tsort.rb:180:in `each'
from /home/p4/.rvm/rubies/ruby-2.0.0-p247/lib/ruby/2.0.0/tsort.rb:180:in `each_strongly_connected_component'
from /home/p4/.rvm/rubies/ruby-2.0.0-p247/lib/ruby/2.0.0/tsort.rb:148:in `tsort_each'
from /home/p4/.rvm/gems/ruby-2.0.0-p247/gems/railties-4.0.0/lib/rails/initializable.rb:54:in `run_initializers'
from /home/p4/.rvm/gems/ruby-2.0.0-p247/gems/railties-4.0.0/lib/rails/application.rb:215:in `initialize!'
from /home/p4/.rvm/gems/ruby-2.0.0-p247/gems/railties-4.0.0/lib/rails/railtie/configurable.rb:30:in `method_missing'
from /home/p4/rails_tut/test_app/config/environment.rb:5:in `<top (required)>'
from /home/p4/.rvm/gems/ruby-2.0.0-p247/gems/activesupport-4.0.0/lib/active_support/dependencies.rb:228:in `require'
from /home/p4/.rvm/gems/ruby-2.0.0-p247/gems/activesupport-4.0.0/lib/active_support/dependencies.rb:228:in `block in require'
from /home/p4/.rvm/gems/ruby-2.0.0-p247/gems/activesupport-4.0.0/lib/active_support/dependencies.rb:213:in `load_dependency'
from /home/p4/.rvm/gems/ruby-2.0.0-p247/gems/activesupport-4.0.0/lib/active_support/dependencies.rb:228:in `require'
from /home/p4/.rvm/gems/ruby-2.0.0-p247/gems/railties-4.0.0/lib/rails/application.rb:189:in `require_environment!'
from /home/p4/.rvm/gems/ruby-2.0.0-p247/gems/railties-4.0.0/lib/rails/commands.rb:45:in `<top (required)>'
from bin/rails:4:in `require'
from bin/rails:4:in `<main>'
I have no idea what this the internal working of rails is as this error seem to be some problem coming from 'mapping.rb'.
The following it my routes.rb
TestApp::Application.routes.draw do
root 'dunbs' => 'dunbs#index'
end
Your syntax for defining a root route is incorrect, it should be either root to: 'dunbs#index' or root 'dunbs#index'.
See http://guides.rubyonrails.org/routing.html#using-root for more details.

Resources