2013-12-13 46 views
1

我錯誤地試圖做gem update --system 2.1.9當我有紅寶石版本1.9.3-p194。每當我嘗試從命令行使用gem時,都會收到以下錯誤(下文)。我試圖找出如何撤消損壞,但我無法找到rubygems在設置GEM_PATH試過寶石更新 - 系統2.1.9錯誤地現在寶石不工作

/Users/jgalt/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/site_ruby/1.9.1/rubygems/deprecate.rb:53:in `alias_method': undefined method `default_system_source_cache_dir' for class `Module' (NameError) 
from /Users/jgalt/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/site_ruby/1.9.1/rubygems/deprecate.rb:53:in `block in deprecate' 
from /Users/jgalt/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/site_ruby/1.9.1/rubygems/deprecate.rb:51:in `class_eval' 
from /Users/jgalt/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/site_ruby/1.9.1/rubygems/deprecate.rb:51:in `deprecate' 
from /Users/jgalt/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/site_ruby/1.9.1/rubygems.rb:1298:in `singletonclass' 
from /Users/jgalt/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/site_ruby/1.9.1/rubygems.rb:1285:in `<module:Gem>' 
from /Users/jgalt/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/site_ruby/1.9.1/rubygems.rb:1284:in `<top (required)>' 
from <internal:gem_prelude>:1:in `require' 
from <internal:gem_prelude>:1:in `<compiled>' 
+1

我看你已經使用過rvm,可以用rvm命令重新安裝ruby 'rvm重新安裝ruby-1.9.3-p194',或者你希望修復系統而無需重新安裝? –

回答

1

剛剛安裝的RubyGems可以使用:

rvm rubygems latest 

,或者如果你希望有一個系列的最新版本:

rvm rubygems latest-2.1 

,或者如果你想具體版本:

rvm rubygems 2.1.9