Rails服务器不在一个项目上工作,但在另一个项目上工作

时间:2015-04-07 18:36:32

标签: ruby-on-rails

我的rails服务器不能用于一个项目,但是它可以用于另一个项目。

对于不起作用的项目,当我在终端中运行rails时,我得到以下输出:

=> Booting Thin
=> Rails 4.1.0 application starting in development on http://0.0.0.0:3000
=> Run `rails server -h` for more startup options
=> Notice: server is listening on all interfaces (0.0.0.0). Consider using 127.0.0.1 (--binding option)
=> Ctrl-C to shutdown server
Exiting
/Users/christinating/.rvm/gems/ruby-2.1.3/bundler/gems/active_admin-48a8674a4566/lib/active_admin/application.rb:116:in `allow_comments=': `config.allow_comments` is no longer provided in ActiveAdmin 1.x. Use `config.comments` instead. (RuntimeError)
    from /Users/christinating/scholarhood/config/initializers/active_admin.rb:104:in `block in <top (required)>'
    from /Users/christinating/.rvm/gems/ruby-2.1.3/bundler/gems/active_admin-48a8674a4566/lib/active_admin.rb:71:in `setup'
    from /Users/christinating/scholarhood/config/initializers/active_admin.rb:1:in `<top (required)>'
    from /Users/christinating/.rvm/gems/ruby-2.1.3/gems/zeus-0.15.4/lib/zeus/load_tracking.rb:50:in `load'
    from /Users/christinating/.rvm/gems/ruby-2.1.3/gems/zeus-0.15.4/lib/zeus/load_tracking.rb:50:in `load'
    from /Users/christinating/.rvm/gems/ruby-2.1.3/gems/zeus-0.15.4/lib/zeus/load_tracking.rb:43:in `load'
    from /Users/christinating/.rvm/gems/ruby-2.1.3/gems/activesupport-4.1.0/lib/active_support/dependencies.rb:241:in `block in load'
    from /Users/christinating/.rvm/gems/ruby-2.1.3/gems/activesupport-4.1.0/lib/active_support/dependencies.rb:232:in `load_dependency'
    from /Users/christinating/.rvm/gems/ruby-2.1.3/gems/activesupport-4.1.0/lib/active_support/dependencies.rb:241:in `load'
    from /Users/christinating/.rvm/gems/ruby-2.1.3/gems/railties-4.1.0/lib/rails/engine.rb:648:in `block in load_config_initializer'
    from /Users/christinating/.rvm/gems/ruby-2.1.3/gems/activesupport-4.1.0/lib/active_support/notifications.rb:161:in `instrument'
    from /Users/christinating/.rvm/gems/ruby-2.1.3/gems/railties-4.1.0/lib/rails/engine.rb:647:in `load_config_initializer'
    from /Users/christinating/.rvm/gems/ruby-2.1.3/gems/railties-4.1.0/lib/rails/engine.rb:612:in `block (2 levels) in <class:Engine>'
    from /Users/christinating/.rvm/gems/ruby-2.1.3/gems/railties-4.1.0/lib/rails/engine.rb:611:in `each'
    from /Users/christinating/.rvm/gems/ruby-2.1.3/gems/railties-4.1.0/lib/rails/engine.rb:611:in `block in <class:Engine>'
    from /Users/christinating/.rvm/gems/ruby-2.1.3/gems/railties-4.1.0/lib/rails/initializable.rb:30:in `instance_exec'
    from /Users/christinating/.rvm/gems/ruby-2.1.3/gems/railties-4.1.0/lib/rails/initializable.rb:30:in `run'
    from /Users/christinating/.rvm/gems/ruby-2.1.3/gems/railties-4.1.0/lib/rails/initializable.rb:55:in `block in run_initializers'
    from /Users/christinating/.rvm/rubies/ruby-2.1.3/lib/ruby/2.1.0/tsort.rb:226:in `block in tsort_each'
    from /Users/christinating/.rvm/rubies/ruby-2.1.3/lib/ruby/2.1.0/tsort.rb:348:in `block (2 levels) in each_strongly_connected_component'
    from /Users/christinating/.rvm/rubies/ruby-2.1.3/lib/ruby/2.1.0/tsort.rb:418:in `block (2 levels) in each_strongly_connected_component_from'
    from /Users/christinating/.rvm/rubies/ruby-2.1.3/lib/ruby/2.1.0/tsort.rb:427:in `each_strongly_connected_component_from'
    from /Users/christinating/.rvm/rubies/ruby-2.1.3/lib/ruby/2.1.0/tsort.rb:417:in `block in each_strongly_connected_component_from'
    from /Users/christinating/.rvm/gems/ruby-2.1.3/gems/railties-4.1.0/lib/rails/initializable.rb:44:in `each'
    from /Users/christinating/.rvm/gems/ruby-2.1.3/gems/railties-4.1.0/lib/rails/initializable.rb:44:in `tsort_each_child'
    from /Users/christinating/.rvm/rubies/ruby-2.1.3/lib/ruby/2.1.0/tsort.rb:411:in `call'
    from /Users/christinating/.rvm/rubies/ruby-2.1.3/lib/ruby/2.1.0/tsort.rb:411:in `each_strongly_connected_component_from'
    from /Users/christinating/.rvm/rubies/ruby-2.1.3/lib/ruby/2.1.0/tsort.rb:347:in `block in each_strongly_connected_component'
    from /Users/christinating/.rvm/rubies/ruby-2.1.3/lib/ruby/2.1.0/tsort.rb:345:in `each'
    from /Users/christinating/.rvm/rubies/ruby-2.1.3/lib/ruby/2.1.0/tsort.rb:345:in `call'
    from /Users/christinating/.rvm/rubies/ruby-2.1.3/lib/ruby/2.1.0/tsort.rb:345:in `each_strongly_connected_component'
    from /Users/christinating/.rvm/rubies/ruby-2.1.3/lib/ruby/2.1.0/tsort.rb:224:in `tsort_each'
    from /Users/christinating/.rvm/rubies/ruby-2.1.3/lib/ruby/2.1.0/tsort.rb:205:in `tsort_each'
    from /Users/christinating/.rvm/gems/ruby-2.1.3/gems/railties-4.1.0/lib/rails/initializable.rb:54:in `run_initializers'
    from /Users/christinating/.rvm/gems/ruby-2.1.3/gems/railties-4.1.0/lib/rails/application.rb:288:in `initialize!'
    from /Users/christinating/.rvm/gems/ruby-2.1.3/gems/railties-4.1.0/lib/rails/railtie.rb:194:in `public_send'
    from /Users/christinating/.rvm/gems/ruby-2.1.3/gems/railties-4.1.0/lib/rails/railtie.rb:194:in `method_missing'
    from /Users/christinating/scholarhood/config/environment.rb:5:in `<top (required)>'
    from /Users/christinating/.rvm/gems/ruby-2.1.3/gems/activesupport-4.1.0/lib/active_support/dependencies.rb:247:in `require'
    from /Users/christinating/.rvm/gems/ruby-2.1.3/gems/activesupport-4.1.0/lib/active_support/dependencies.rb:247:in `block in require'
    from /Users/christinating/.rvm/gems/ruby-2.1.3/gems/activesupport-4.1.0/lib/active_support/dependencies.rb:232:in `load_dependency'
    from /Users/christinating/.rvm/gems/ruby-2.1.3/gems/activesupport-4.1.0/lib/active_support/dependencies.rb:247:in `require'
    from /Users/christinating/scholarhood/config.ru:11:in `block in <main>'
    from /Users/christinating/.rvm/gems/ruby-2.1.3/gems/rack-1.5.2/lib/rack/builder.rb:55:in `instance_eval'
    from /Users/christinating/.rvm/gems/ruby-2.1.3/gems/rack-1.5.2/lib/rack/builder.rb:55:in `initialize'
    from /Users/christinating/scholarhood/config.ru:in `new'
    from /Users/christinating/scholarhood/config.ru:in `<main>'
    from /Users/christinating/.rvm/gems/ruby-2.1.3/gems/rack-1.5.2/lib/rack/builder.rb:49:in `eval'
    from /Users/christinating/.rvm/gems/ruby-2.1.3/gems/rack-1.5.2/lib/rack/builder.rb:49:in `new_from_string'
    from /Users/christinating/.rvm/gems/ruby-2.1.3/gems/rack-1.5.2/lib/rack/builder.rb:40:in `parse_file'
    from /Users/christinating/.rvm/gems/ruby-2.1.3/gems/rack-1.5.2/lib/rack/server.rb:277:in `build_app_and_options_from_config'
    from /Users/christinating/.rvm/gems/ruby-2.1.3/gems/rack-1.5.2/lib/rack/server.rb:199:in `app'
    from /Users/christinating/.rvm/gems/ruby-2.1.3/gems/railties-4.1.0/lib/rails/commands/server.rb:50:in `app'
    from /Users/christinating/.rvm/gems/ruby-2.1.3/gems/rack-1.5.2/lib/rack/server.rb:314:in `wrapped_app'
    from /Users/christinating/.rvm/gems/ruby-2.1.3/gems/railties-4.1.0/lib/rails/commands/server.rb:130:in `log_to_stdout'
    from /Users/christinating/.rvm/gems/ruby-2.1.3/gems/railties-4.1.0/lib/rails/commands/server.rb:67:in `start'
    from /Users/christinating/.rvm/gems/ruby-2.1.3/gems/railties-4.1.0/lib/rails/commands/commands_tasks.rb:81:in `block in server'
    from /Users/christinating/.rvm/gems/ruby-2.1.3/gems/railties-4.1.0/lib/rails/commands/commands_tasks.rb:76:in `tap'
    from /Users/christinating/.rvm/gems/ruby-2.1.3/gems/railties-4.1.0/lib/rails/commands/commands_tasks.rb:76:in `server'
    from /Users/christinating/.rvm/gems/ruby-2.1.3/gems/railties-4.1.0/lib/rails/commands/commands_tasks.rb:40:in `run_command!'
    from /Users/christinating/.rvm/gems/ruby-2.1.3/gems/railties-4.1.0/lib/rails/commands.rb:17:in `<top (required)>'
    from bin/rails:4:in `require'
    from bin/rails:4:in `<main>'

这个项目需要版本ruby 2.1.3才能工作。

有人可以帮助我吗?

1 个答案:

答案 0 :(得分:0)

根据错误消息:

  ActiveAdmin 1.x中不再提供

config.allow_comments。请改用config.comments

因此,您需要修改config/initializers/active_admin.rb并更改:

config.allow_comments

为:

config.comments