`add_frozen_gem_path':Gem的未定义方法`source_index':模块(NoMethodError)当我尝试运行我的服务器时出现此错误

时间:2013-09-05 16:05:03

标签: ruby-on-rails ruby nomethoderror

from /home/rakesh/.rvm/gems/ruby-1.8.7-p374/gems/rails-2.3.5/lib/initializer.rb:298:in `add_gem_load_paths'
    from /home/rakesh/.rvm/gems/ruby-1.8.7-p374/gems/rails-2.3.5/lib/initializer.rb:132:in `process'
    from /home/rakesh/.rvm/gems/ruby-1.8.7-p374/gems/rails-2.3.5/lib/initializer.rb:113:in `send'
    from /home/rakesh/.rvm/gems/ruby-1.8.7-p374/gems/rails-2.3.5/lib/initializer.rb:113:in `run'
    from /home/rakesh/rails/rankfedena/config/environment.rb:6
    from /home/rakesh/.rvm/rubies/ruby-1.8.7-p374/lib/ruby/site_ruby/1.8/rubygems/core_ext/kernel_require.rb:112:in `gem_original_require'
    from /home/rakesh/.rvm/rubies/ruby-1.8.7-p374/lib/ruby/site_ruby/1.8/rubygems/core_ext/kernel_require.rb:112:in `require'
    from /home/rakesh/.rvm/gems/ruby-1.8.7-p374/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:156:in `require'
    from /home/rakesh/.rvm/gems/ruby-1.8.7-p374/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:521:in `new_constants_in'
    from /home/rakesh/.rvm/gems/ruby-1.8.7-p374/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:156:in `require'
    from /home/rakesh/.rvm/gems/ruby-1.8.7-p374/gems/rails-2.3.5/lib/commands/server.rb:84
    from /home/rakesh/.rvm/rubies/ruby-1.8.7-p374/lib/ruby/site_ruby/1.8/rubygems/core_ext/kernel_require.rb:64:in `gem_original_require'
    from /home/rakesh/.rvm/rubies/ruby-1.8.7-p374/lib/ruby/site_ruby/1.8/rubygems/core_ext/kernel_require.rb:64:in `require'
    from ./script/server:3

2 个答案:

答案 0 :(得分:6)

将宝石更新为1.8.25

gem update --system 1.8.25

This可能对你有所帮助。

答案 1 :(得分:0)

您可能可以更好地格式化您的问题,以便收到更多回复。根据你所写的内容,它有点模糊/难以理解。

尝试一下,看看它是否以任何方式帮助你。 undefined method `source_index' for Gem:Module (NoMethodError)