2016-09-07 86 views
0
當我使用 ruby script/server命令我的rails服務器啓動

,我得到如下回應Rails的服務器503服務不可用錯誤

=> Booting WEBrick 
=> Rails 2.3.9 application starting on http://0.0.0.0:3000 
/home/ubuntu/.rvm/gems/[email protected]/gems/rails-2.3.9/lib/rails/gem_dependency.rb:21:in `add_frozen_gem_path': undefined method `source_index' for Gem:Module (NoMethodError) 
     from /home/ubuntu/.rvm/gems/[email protected]/gems/rails-2.3.9/lib/initializer.rb:298:in `add_gem_load_paths' 
     from /home/ubuntu/.rvm/gems/[email protected]/gems/rails-2.3.9/lib/initializer.rb:132:in `process' 
     from /home/ubuntu/.rvm/gems/[email protected]/gems/rails-2.3.9/lib/initializer.rb:113:in `send' 
     from /home/ubuntu/.rvm/gems/[email protected]/gems/rails-2.3.9/lib/initializer.rb:113:in `run' 
     from /home/ubuntu/apps/moogle/config/environment.rb:13 
     from /home/ubuntu/.rvm/gems/[email protected]/gems/activesupport-2.3.9/lib/active_support/dependencies.rb:182:in `require' 
     from /home/ubuntu/.rvm/gems/[email protected]/gems/activesupport-2.3.9/lib/active_support/dependencies.rb:182:in `require' 
     from /home/ubuntu/.rvm/gems/[email protected]/gems/activesupport-2.3.9/lib/active_support/dependencies.rb:547:in `new_constants_in' 
     from /home/ubuntu/.rvm/gems/[email protected]/gems/activesupport-2.3.9/lib/active_support/dependencies.rb:182:in `require' 
     from /home/ubuntu/.rvm/gems/[email protected]/gems/rails-2.3.9/lib/commands/server.rb:84 
     from script/server:3:in `require' 
     from script/server:3 

我使用ProxyPreseve像

<VirtualHost *:80> 
ProxyPreserveHost On 
    ProxyPass/http://0.0.0.0:3000/ 
    ProxyPassReverse/http://0.0.0.0:3000/ 
    ServerName localhost 
</VirtualHost> 

而且我得到503服務不可用的錯誤。任何人都可以告訴我我的應用程序有什麼問題嗎?

Rails的版本:2.3.9 的Ruby版本:1.8.7-P374 包版本:1.12.5 寶石版本:2.0.17

+0

只是爲了確認:你真的想在Ruby 1.8.7上運行Rails 2.3.9嗎? – spickermann

+0

@spickermann - 是的,沒錯。 – lock

+0

'rubygems'版本有問題http://stackoverflow.com/questions/15349869/undefined-method-source-index-for-gemmodule-nomethoderror –

回答

1

您需要降級rubygems版本

gem update --system 1.8.25 

參考相同問題的解決方案here

+0

這解決了問題隊友,謝謝一噸:) – lock

相關問題