我正在尝试安装rubygems,与管家(IRC Bot)一起使用
Ruby使用yum install 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,我甚至做得对吗?
答案 0 :(得分: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
现在确定你已经弄明白了,但也许其他人必须在未来的旧操作系统上安装rubygems才能从这些信息中受益。
以下是查找rubygems源代码下载文件的URL:http://rubyforge.org/frs/?group_id=126&release_id=15425