2013-02-21 68 views
0

我正嘗試安裝RubyGems的,與管家(IRC BOT)安裝RubyGems的安裝問題

紅寶石成功地,用yum安裝Ruby

和使用Ruby -v給我ruby 1.8.5 (2006-08-25) [i386-linux]

現在,安裝紅寶石寶石,我使用wget http://rubyforge.org/frs/download.php/76728/rubygems-1.8.25.zip然後unzip rubygems-1.8.25.zip一切解壓罰款

現在,進一步在我tutorial i am using它告訴我做ruby setup.rb對此我做荷蘭國際集團,然後,我收到此錯誤:

./lib/rubygems.rb:335: warning: parenthesize argument(s) for future version 
./lib/rubygems.rb:517: warning: parenthesize argument(s) for future version 
./lib/rubygems.rb:32:in `require': ./lib/rubygems/deprecate.rb:54: syntax error (SyntaxError) 
     define_method name do |*args, &block| # TODO: really works on 1.8.7? 
            ^
./lib/rubygems/deprecate.rb:55: syntax error 
./lib/rubygems/deprecate.rb:64: syntax error 
./lib/rubygems/deprecate.rb:69: syntax error from ./lib/rubygems.rb:32 
     from setup.rb:27:in `require' 
     from setup.rb:27 

我沒有一個線索從哪裏開始,試圖解決這個問題,或者我需要做什麼。我期待安裝rubygems,我是否正確地做到了這一點?

+1

這是一個常見的問題。嘗試使用RVM --- https://rvm.io/ – Hemanth 2013-02-21 06:37:01

回答

1

確保rubygems的版本與您安裝的ruby版本兼容。

對Ruby 1.8.5,最新的rubygems兼容版本RubyGems的是,1.3.5

$ ruby --version 
ruby 1.8.5 (2006-08-25) [i386-linux] 

下面是如何安裝您需要的版本:

$ cd ~/sources 
$ wget http://rubyforge.org/frs/download.php/60718/rubygems-1.3.5.tgz 
$ tar xzvf rubygems-1.3.5.tgz 
$ cd rubygems-1.3.5 
$ sudo ruby setup.rb 
RubyGems 1.3.5 installed 

=== 1.3.5/2009-07-21 

Bug fixes: 

* Fix use of prerelease gems. 
* Gem.bin_path no longer escapes path with spaces. Bug #25935 and #26458. 

Deprecation Notices: 

* Bulk index update is no longer supported (the code currently remains, but not 
    the tests) 
* Gem::manage_gems was removed in 1.3.3. 
* Time::today was removed in 1.3.3. 


------------------------------------------------------------------------------ 

RubyGems installed the following executables: 
    /usr/bin/gem 

It'm務必」現在已經知道了,但也許其他人將來可能會從這些信息中受益。

這裏的網址找到RubyGems的源下載文件:http://rubyforge.org/frs/?group_id=126&release_id=15425