"脚本/服务器" RoR RVM出错

时间:2014-09-03 07:11:55

标签: ruby-on-rails rvm

在从作者升级后,我正在使用RVM运行RoR应用程序。它促使我安装了更新版本的ruby:ruby-1.9.3-p448而不是ruby-1.8.7-p374,我已经使用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>'

请指导我。

1 个答案:

答案 0 :(得分:4)

您的宝石版导致此问题。您需要将gem版本降级为1.8.2x才能解决此问题。或者您也可以降级您的ruby版本。尝试使用ruby 1.9.3-p327它在我的本地工作得很好。希望这能帮助你。