我已经成功地安装了ruby1.9.1,但是在下载了.tgz存档之后,提供了这里并完成了
sudo ruby1.9.1 setup.rb我明白了:
/home/elliot/Downloads/rubygems-1.4.1 (2)/lib/rubygems/source_index.rb:62:in `installed_spec_directories': undefined method `path' for Gem:Module (NoMethodError)
from /home/elliot/Downloads/rubygems-1.4.1 (2)/lib/rubygems/source_index.rb:52:in `from_installed_gems'
from /home/elliot/Downloads/rubygems-1.4.1 (2)/lib/rubygems.rb:914:in `source_index'
from /home/elliot/Downloads/rubygems-1.4.1 (2)/lib/rubygems/gem_path_searcher.rb:98:in `init_gemspecs'
from /home/elliot/Downloads/rubygems-1.4.1 (2)/lib/rubygems/gem_path_searcher.rb:13:in `initialize'
from /home/elliot/Downloads/rubygems-1.4.1 (2)/lib/rubygems.rb:873:in `new'
from /home/elliot/Downloads/rubygems-1.4.1 (2)/lib/rubygems.rb:873:in `searcher'
from /home/elliot/Downloads/rubygems-1.4.1 (2)/lib/rubygems.rb:495:in `find_files'
from /home/elliot/Downloads/rubygems-1.4.1 (2)/lib/rubygems.rb:1034:in `load_plugins'
from /home/elliot/Downloads/rubygems-1.4.1 (2)/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>'为什么用Ruby1.9.1安装RubyGems这么痛苦?如何正确安装?提前谢了,好吧。
发布于 2011-01-01 23:22:00
与python (和Java)一样,如果在基于Debian的系统上使用默认安装,则会遇到大量问题。每一种语言似乎都想对安装自动化系统大做文章,而不是使用现有的系统。
真正的解决方案是通过apt安装ruby和rubygems,如果包不存在,则创建包并将它们保存在ppa中供其他人安装。
发布于 2011-01-02 10:42:59
如果您对使用Ruby的最新版本感兴趣(我建议使用1.9.2,因为它是最新的稳定版本),那么实现这一点的最好方法是使用rvm。
https://askubuntu.com/questions/19659
复制相似问题