这个Devise错误是什么意思?

时间:2013-11-17 23:04:09

标签: ruby-on-rails ruby ruby-on-rails-3 gem nitrousio

当我尝试运行我的rails服务器时,我收到以下错误(重要提示:我刚刚将我的代码从Github拉到Nitrous.Io,并开始处理该应用程序):

/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>'

1 个答案:

答案 0 :(得分:1)

看起来您的数据库尚未创建。

最有可能的解决方案是运行rake db:migrate如果您正在使用sqlite,但如果您在Nitrous上使用Postgres或Mysql,则需要先安装它们。这里提供了http://help.nitrous.io/categories/databases/

的指南