Ruby on Rails更新gems(“gem update --system”),获取错误消息

我正在运行命令“gem update --system” . 我收到以下错误消息 . 任何帮助,将不胜感激!

我正在运行Rails 1.9.2补丁136和ruby 3.0.3 .

Users/woshea/.rvm/gems/ruby-1.9.2-p136@rails3tutorial/gems/rubygems-update-1.4.1/lib/rubygems/source_index.rb:62:in `installed_spec_directories': undefined method `path' for Gem:Module (NoMethodError)
    from /Users/woshea/.rvm/gems/ruby-1.9.2-p136@rails3tutorial/gems/rubygems-update-1.4.1/lib/rubygems/source_index.rb:52:in `from_installed_gems'
    from /Users/woshea/.rvm/gems/ruby-1.9.2-p136@rails3tutorial/gems/rubygems-update-1.4.1/lib/rubygems.rb:914:in `source_index'
    from /Users/woshea/.rvm/gems/ruby-1.9.2-p136@rails3tutorial/gems/rubygems-update-1.4.1/lib/rubygems/gem_path_searcher.rb:98:in `init_gemspecs'
    from /Users/woshea/.rvm/gems/ruby-1.9.2-p136@rails3tutorial/gems/rubygems-update-1.4.1/lib/rubygems/gem_path_searcher.rb:13:in `initialize'
    from /Users/woshea/.rvm/gems/ruby-1.9.2-p136@rails3tutorial/gems/rubygems-update-1.4.1/lib/rubygems.rb:873:in `new'
    from /Users/woshea/.rvm/gems/ruby-1.9.2-p136@rails3tutorial/gems/rubygems-update-1.4.1/lib/rubygems.rb:873:in `searcher'
    from /Users/woshea/.rvm/gems/ruby-1.9.2-p136@rails3tutorial/gems/rubygems-update-1.4.1/lib/rubygems.rb:495:in `find_files'
    from /Users/woshea/.rvm/gems/ruby-1.9.2-p136@rails3tutorial/gems/rubygems-update-1.4.1/lib/rubygems.rb:1034:in `load_plugins'
    from /Users/woshea/.rvm/gems/ruby-1.9.2-p136@rails3tutorial/gems/rubygems-update-1.4.1/lib/rubygems/gem_runner.rb:84:in `<top (required)>'
    from <internal:lib/rubygems/custom_require>:29:in `require'
    from <internal:lib/rubygems/custom_require>:29:in `require'
    from setup.rb:25:in `<main>'

我的环境如下:

  • RUBYGEMS版本:1.3.7

  • RUBY VERSION:1.9.2(2010-12-25 patchlevel 136)[x86_64-darwin10.4.0]

  • 安装目录:/Users/woshea/.rvm/gems/ruby-1.9.2-p136@rails3tutorial

  • RUBY EXECUTABLE:/Users/woshea/.rvm/rubies/ruby-1.9.2-p136/bin/ruby

  • 可执行目录:/Users/woshea/.rvm/gems/ruby-1.9.2-p136@rails3tutorial/bin

  • RUBYGEMS PLATFORMS:

  • 红宝石

  • x86_64-darwin-10

  • GEM路径:

  • /Users/woshea/.rvm/gems/ruby-1.9.2-p136@rails3tutorial

  • /Users/woshea/.rvm/gems/ruby-1.9.2-p136@global

  • 创业板配置:

  • :update_sources => true

  • :verbose => true

  • :benchmark => false

  • :backtrace => false

  • :bulk_threshold => 1000

  • 远程来源:

  • http://rubygems.org/

回答(1)

3 years ago

截至2011年1月2日,RubyGems 1.4.0 / 1.4.1版本不适用于MRI Ruby 1.9 . 记录在案:见the release post .

由于您正在运行MRI Ruby 1.9,请与我一起等待更新的MRI Ruby 1.9,它将支持更新的RubyGems 1.4 .