2013-04-03 23 views
0

,在最近几天,我无法运行rails server/rails s甚至bundle exec rails server命令了。 之前它运行得像个魅力。无法在我的应用程序中运行rails server(主动支持错误)

我试图恢复使用git的变化,但没有运气,我试着所有可能的礼仪,我可以想到的。 我使用rubymine,但使用终端时也出现同样的问题。

当我运行:

[email protected]:~/ts$ rails server 

我收到以下错误堆栈跟踪:

from /home/ma/.rvm/gems/ruby-1.9.3-p392/gems/activesupport-3.2.13/lib/active_support/dependencies.rb:251:in `block in require' 
    from /home/ma/.rvm/gems/ruby-1.9.3-p392/gems/activesupport-3.2.13/lib/active_support/dependencies.rb:236:in `load_dependency' 
    from /home/ma/.rvm/gems/ruby-1.9.3-p392/gems/activesupport-3.2.13/lib/active_support/dependencies.rb:251:in `require' 
    from /home/ma/.rvm/gems/[email protected]/gems/unicorn-4.6.2/lib/unicorn/http_request.rb:4:in `<top (required)>' 
    from /home/ma/.rvm/gems/ruby-1.9.3-p392/gems/activesupport-3.2.13/lib/active_support/dependencies.rb:251:in `require' 
    from /home/ma/.rvm/gems/ruby-1.9.3-p392/gems/activesupport-3.2.13/lib/active_support/dependencies.rb:251:in `block in require' 
    from /home/ma/.rvm/gems/ruby-1.9.3-p392/gems/activesupport-3.2.13/lib/active_support/dependencies.rb:236:in `load_dependency' 
    from /home/ma/.rvm/gems/ruby-1.9.3-p392/gems/activesupport-3.2.13/lib/active_support/dependencies.rb:251:in `require' 
    from /home/ma/.rvm/gems/[email protected]/gems/unicorn-4.6.2/lib/unicorn.rb:103:in `<top (required)>' 
    from /home/ma/.rvm/gems/ruby-1.9.3-p392/gems/bundler-1.3.4/lib/bundler/runtime.rb:72:in `require' 
    from /home/ma/.rvm/gems/ruby-1.9.3-p392/gems/bundler-1.3.4/lib/bundler/runtime.rb:72:in `block (2 levels) in require' 
    from /home/ma/.rvm/gems/ruby-1.9.3-p392/gems/bundler-1.3.4/lib/bundler/runtime.rb:70:in `each' 
    from /home/ma/.rvm/gems/ruby-1.9.3-p392/gems/bundler-1.3.4/lib/bundler/runtime.rb:70:in `block in require' 
    from /home/ma/.rvm/gems/ruby-1.9.3-p392/gems/bundler-1.3.4/lib/bundler/runtime.rb:59:in `each' 
    from /home/ma/.rvm/gems/ruby-1.9.3-p392/gems/bundler-1.3.4/lib/bundler/runtime.rb:59:in `require' 
    from /home/ma/.rvm/gems/ruby-1.9.3-p392/gems/bundler-1.3.4/lib/bundler.rb:132:in `require' 
    from /home/ma/ts/config/application.rb:16:in `<top (required)>' 
    from /home/ma/.rvm/gems/ruby-1.9.3-p392/gems/railties-3.2.13/lib/rails/commands.rb:53:in `require' 
    from /home/ma/.rvm/gems/ruby-1.9.3-p392/gems/railties-3.2.13/lib/rails/commands.rb:53:in `block in <top (required)>' 
    from /home/ma/.rvm/gems/ruby-1.9.3-p392/gems/railties-3.2.13/lib/rails/commands.rb:50:in `tap' 
    from /home/ma/.rvm/gems/ruby-1.9.3-p392/gems/railties-3.2.13/lib/rails/commands.rb:50:in `<top (required)>' 
    from script/rails:6:in `require' 
    from script/rails:6:in `<main>' 

我不知道我怎么能解决这个问题,让Rails服务器命令再次运行! 任何帮助将不胜感激!

ps:请告诉我,如果我需要提供更多信息。谢谢。

+0

您是否升级了Ruby? –

+0

是的!这是我做过的很多事情的开始!你认为这可能是原因吗? 我会尝试重用旧版本并查看。如果这能解决它! – Mawaheb

+0

我在另一个线程上读到升级可能导致问题。如果您使用的是RVM,恢复应该很简单。 –

回答

0

您可以尝试建立一个全新的宝石的问题(使用它),然后bundle install,以便Bundler安装Gemfile中列出的宝石。 stacktrace似乎表明你正在使用全局gemset,这是一个非常糟糕的主意。

1

感谢杰夫 创建一个新的宝石,并用它 并在此之后:

gem install unicorn 

固定与命令:)

+0

如果它对你有帮助,请标记一个正确的答案。 –

相关问题