2014-09-03 45 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