2014-09-03 16 views
1

從作者升級後,我正在運行使用RVM的RoR應用程序。它促使我安裝了更高版本的ruby:ruby-1.9.3-p448,而不是ruby-1.8.7-p374,我已經使用RVM安裝了它。RoR RVM中的「腳本/服務器」錯誤

現在,當我運行script/server它拋出這個錯誤:

/home/abcsoeasy/.rvm/gems/ruby-1.9.3-p448/gems/activesupport-2.3.18/lib/active_support/inflector.rb:3:in '<top (required)>': iconv will be deprecated in the future, use String#encode instead. 
=> Booting WEBrick 
=> Rails 2.3.18 application starting on http://0.0.0.0:3000 
/home/abcsoeasy/.rvm/gems/ruby-1.9.3-p448/gems/rails-2.3.18/lib/rails/gem_dependency.rb:21:in 'add_frozen_gem_path': undefined method 'source_index' for Gem:Module (NoMethodError) 
    from /home/abcsoeasy/.rvm/gems/ruby-1.9.3-p448/gems/rails-2.3.18/lib/initializer.rb:298:in 'add_gem_load_paths' 
    from /home/abcsoeasy/.rvm/gems/ruby-1.9.3-p448/gems/rails-2.3.18/lib/initializer.rb:132:in 'process' 
    from /home/abcsoeasy/.rvm/gems/ruby-1.9.3-p448/gems/rails-2.3.18/lib/initializer.rb:113:in 'run' 
    from /home/abcsoeasy/epz_lts-master/config/environment.rb:7:in '<top (required)>' 
    from /home/abcsoeasy/.rvm/gems/ruby-1.9.3-p448/gems/activesupport-2.3.18/lib/active_support/dependencies.rb:182:in 'require' 
    from /home/abcsoeasy/.rvm/gems/ruby-1.9.3-p448/gems/activesupport-2.3.18/lib/active_support/dependencies.rb:182:in 'block in require' 
    from /home/abcsoeasy/.rvm/gems/ruby-1.9.3-p448/gems/activesupport-2.3.18/lib/active_support/dependencies.rb:547:in 'new_constants_in' 
    from /home/abcsoeasy/.rvm/gems/ruby-1.9.3-p448/gems/activesupport-2.3.18/lib/active_support/dependencies.rb:182:in 'require' 
    from /home/abcsoeasy/.rvm/gems/ruby-1.9.3-p448/gems/rails-2.3.18/lib/commands/server.rb:84:in '<top (required)>' 
    from script/server:3:in 'require' 
    from script/server:3:in '<main>' 

請指引我。

+0

嘗試運行此命令:'gem update --system 1.8.25' – Surya 2014-09-03 07:26:28

回答

3

您的寶石版本導致此問題。您需要將gem版本降級到1.8.2x才能解決此問題。或者你也可以降級你的ruby版本。嘗試使用ruby 1.9.3-p327它對我的本地工作很好。希望這對你有所幫助。

+0

我認爲問題出在寶石版本上,而不是ruby。將檢查它 – abcsoeasy 2014-09-03 07:56:34

+0

是的,這是寶石版本的問題,我認爲'紅寶石1.9.3-p327'使用'1.8.27'。 – 2014-09-03 07:58:04

+0

非常感謝,橫渡了那個錯誤。通過運行'rvm ruby​​gems 1.8.27 --force' – abcsoeasy 2014-09-05 10:33:47