我正在尝试安装rubygems,以便与butler (IRC Bot)一起使用。
Ruby安装成功,使用yum install ruby
和ruby -v给我ruby 1.8.5 (2006-08-25) [i386-linux]
现在,在安装ruby gem时,我使用的是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,我做得对吗?
发布于 2013-03-27 08:36:40
确保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
https://stackoverflow.com/questions/14995944
复制相似问题