无法启动Rails服务器,ActiveAdmin可能有问题

时间:2016-09-25 08:53:35

标签: ruby-on-rails ruby ruby-on-rails-4 activeadmin

我安装了ActiveAdmin来管理我的Rails应用程序的Admin端,一切都非常好,直到我为ActiveAdmin生成了一个模型。现在rails服务器无法启动,即使Rake回滚或rails d active_admin:resource MyModel也不起作用。我现在很无能,可能是一个简单的愚蠢错误,但我仍然想不通,BTW这里是错误转储。

/home/ubuntu/workspace/app/admin/products.rb:1:in `<top (required)>': uninitialized constant Products (NameError)
        from /usr/local/rvm/gems/ruby-2.3.0/bundler/gems/activeadmin-f8926831429f/lib/active_admin/application.rb:216:in `block in load'
        from /usr/local/rvm/gems/ruby-2.3.0/bundler/gems/activeadmin-f8926831429f/lib/active_admin/error.rb:41:in `capture'
        from /usr/local/rvm/gems/ruby-2.3.0/bundler/gems/activeadmin-f8926831429f/lib/active_admin/application.rb:216:in `load'
        from /usr/local/rvm/gems/ruby-2.3.0/bundler/gems/activeadmin-f8926831429f/lib/active_admin/application.rb:208:in `block in load!'
        from /usr/local/rvm/gems/ruby-2.3.0/bundler/gems/activeadmin-f8926831429f/lib/active_admin/application.rb:208:in `each'
        from /usr/local/rvm/gems/ruby-2.3.0/bundler/gems/activeadmin-f8926831429f/lib/active_admin/application.rb:208:in `load!'
        from /usr/local/rvm/gems/ruby-2.3.0/bundler/gems/activeadmin-f8926831429f/lib/active_admin/application.rb:230:in `routes'
        from /usr/local/rvm/gems/ruby-2.3.0/bundler/gems/activeadmin-f8926831429f/lib/active_admin.rb:79:in `routes'
        from /home/ubuntu/workspace/config/routes.rb:4:in `block in <top (required)>'
        from /usr/local/rvm/gems/ruby-2.3.0/gems/actionpack-4.2.5/lib/action_dispatch/routing/route_set.rb:434:in `instance_exec'
        from /usr/local/rvm/gems/ruby-2.3.0/gems/actionpack-4.2.5/lib/action_dispatch/routing/route_set.rb:434:in `eval_block'
        from /usr/local/rvm/gems/ruby-2.3.0/gems/actionpack-4.2.5/lib/action_dispatch/routing/route_set.rb:412:in `draw'
        from /home/ubuntu/workspace/config/routes.rb:1:in `<top (required)>'
        from /usr/local/rvm/gems/ruby-2.3.0/gems/railties-4.2.5/lib/rails/application/routes_reloader.rb:40:in `block in load_paths'
        from /usr/local/rvm/gems/ruby-2.3.0/gems/railties-4.2.5/lib/rails/application/routes_reloader.rb:40:in `each'
        from /usr/local/rvm/gems/ruby-2.3.0/gems/railties-4.2.5/lib/rails/application/routes_reloader.rb:40:in `load_paths'
        from /usr/local/rvm/gems/ruby-2.3.0/gems/railties-4.2.5/lib/rails/application/routes_reloader.rb:16:in `reload!'
        from /usr/local/rvm/gems/ruby-2.3.0/gems/railties-4.2.5/lib/rails/application/routes_reloader.rb:26:in `block in updater'
        from /usr/local/rvm/gems/ruby-2.3.0/gems/activesupport-4.2.5/lib/active_support/file_update_checker.rb:75:in `execute'
        from /usr/local/rvm/gems/ruby-2.3.0/gems/railties-4.2.5/lib/rails/application/routes_reloader.rb:27:in `updater'
        from /usr/local/rvm/gems/ruby-2.3.0/gems/railties-4.2.5/lib/rails/application/routes_reloader.rb:7:in `execute_if_updated'
        from /usr/local/rvm/gems/ruby-2.3.0/gems/railties-4.2.5/lib/rails/application/finisher.rb:69:in `block in <module:Finisher>'
        from /usr/local/rvm/gems/ruby-2.3.0/gems/railties-4.2.5/lib/rails/initializable.rb:30:in `instance_exec'
        from /usr/local/rvm/gems/ruby-2.3.0/gems/railties-4.2.5/lib/rails/initializable.rb:30:in `run'
        from /usr/local/rvm/gems/ruby-2.3.0/gems/railties-4.2.5/lib/rails/initializable.rb:55:in `block in run_initializers'
        from /usr/local/rvm/rubies/ruby-2.3.0/lib/ruby/2.3.0/tsort.rb:228:in `block in tsort_each'
        from /usr/local/rvm/rubies/ruby-2.3.0/lib/ruby/2.3.0/tsort.rb:350:in `block (2 levels) in each_strongly_connected_component'
        from /usr/local/rvm/rubies/ruby-2.3.0/lib/ruby/2.3.0/tsort.rb:431:in `each_strongly_connected_component_from'
        from /usr/local/rvm/rubies/ruby-2.3.0/lib/ruby/2.3.0/tsort.rb:349:in `block in each_strongly_connected_component'
        from /usr/local/rvm/rubies/ruby-2.3.0/lib/ruby/2.3.0/tsort.rb:347:in `each'
        from /usr/local/rvm/rubies/ruby-2.3.0/lib/ruby/2.3.0/tsort.rb:347:in `call'
        from /usr/local/rvm/rubies/ruby-2.3.0/lib/ruby/2.3.0/tsort.rb:347:in `each_strongly_connected_component'
        from /usr/local/rvm/rubies/ruby-2.3.0/lib/ruby/2.3.0/tsort.rb:226:in `tsort_each'
        from /usr/local/rvm/rubies/ruby-2.3.0/lib/ruby/2.3.0/tsort.rb:205:in `tsort_each'
        from /usr/local/rvm/gems/ruby-2.3.0/gems/railties-4.2.5/lib/rails/initializable.rb:54:in `run_initializers'
        from /usr/local/rvm/gems/ruby-2.3.0/gems/railties-4.2.5/lib/rails/application.rb:352:in `initialize!'
        from /home/ubuntu/workspace/config/environment.rb:5:in `<top (required)>'
        from /home/ubuntu/workspace/config.ru:3:in `block in <main>'
        from /usr/local/rvm/gems/ruby-2.3.0/gems/rack-1.6.4/lib/rack/builder.rb:55:in `instance_eval'
        from /usr/local/rvm/gems/ruby-2.3.0/gems/rack-1.6.4/lib/rack/builder.rb:55:in `initialize'
        from /home/ubuntu/workspace/config.ru:in `new'
        from /home/ubuntu/workspace/config.ru:in `<main>'
        from /usr/local/rvm/gems/ruby-2.3.0/gems/rack-1.6.4/lib/rack/builder.rb:49:in `eval'
        from /usr/local/rvm/gems/ruby-2.3.0/gems/rack-1.6.4/lib/rack/builder.rb:49:in `new_from_string'
        from /usr/local/rvm/gems/ruby-2.3.0/gems/rack-1.6.4/lib/rack/builder.rb:40:in `parse_file'
        from /usr/local/rvm/gems/ruby-2.3.0/gems/rack-1.6.4/lib/rack/server.rb:299:in `build_app_and_options_from_config'
        from /usr/local/rvm/gems/ruby-2.3.0/gems/rack-1.6.4/lib/rack/server.rb:208:in `app'
        from /usr/local/rvm/gems/ruby-2.3.0/gems/railties-4.2.5/lib/rails/commands/server.rb:61:in `app'
        from /usr/local/rvm/gems/ruby-2.3.0/gems/rack-1.6.4/lib/rack/server.rb:336:in `wrapped_app'
        from /usr/local/rvm/gems/ruby-2.3.0/gems/railties-4.2.5/lib/rails/commands/server.rb:139:in `log_to_stdout'
        from /usr/local/rvm/gems/ruby-2.3.0/gems/railties-4.2.5/lib/rails/commands/server.rb:78:in `start'
        from /usr/local/rvm/gems/ruby-2.3.0/gems/railties-4.2.5/lib/rails/commands/commands_tasks.rb:80:in `block in server'
        from /usr/local/rvm/gems/ruby-2.3.0/gems/railties-4.2.5/lib/rails/commands/commands_tasks.rb:75:in `tap'
        from /usr/local/rvm/gems/ruby-2.3.0/gems/railties-4.2.5/lib/rails/commands/commands_tasks.rb:75:in `server'
        from /usr/local/rvm/gems/ruby-2.3.0/gems/railties-4.2.5/lib/rails/commands/commands_tasks.rb:39:in `run_command!'
        from /usr/local/rvm/gems/ruby-2.3.0/gems/railties-4.2.5/lib/rails/commands.rb:17:in `<top (required)>'
        from /home/ubuntu/workspace/bin/rails:9:in `require'
        from /home/ubuntu/workspace/bin/rails:9:in `<top (required)>'
        from /usr/local/rvm/gems/ruby-2.3.0/gems/spring-1.7.2/lib/spring/client/rails.rb:28:in `load'
        from /usr/local/rvm/gems/ruby-2.3.0/gems/spring-1.7.2/lib/spring/client/rails.rb:28:in `call'
        from /usr/local/rvm/gems/ruby-2.3.0/gems/spring-1.7.2/lib/spring/client/command.rb:7:in `call'
        from /usr/local/rvm/gems/ruby-2.3.0/gems/spring-1.7.2/lib/spring/client.rb:30:in `run'
        from /usr/local/rvm/gems/ruby-2.3.0/gems/spring-1.7.2/bin/spring:49:in `<top (required)>'
        from /usr/local/rvm/gems/ruby-2.3.0/gems/spring-1.7.2/lib/spring/binstub.rb:11:in `load'
        from /usr/local/rvm/gems/ruby-2.3.0/gems/spring-1.7.2/lib/spring/binstub.rb:11:in `<top (required)>'
        from /home/ubuntu/workspace/bin/spring:13:in `require'
        from /home/ubuntu/workspace/bin/spring:13:in `<top (required)>'
        from bin/rails:3:in `load'
        from bin/rails:3:in `<main>'

0 个答案:

没有答案