在 Ubuntu 上正确安装 Ruby 和 Rubygems
看来这个过程比应有的要困难得多。
目前,我手动安装了 ruby 1.9.2。我想更新它以使用 RVM。所以我成功安装了它,然后安装了 1.9.3-p0,它位于 /zenph/.rvm 下的 RVM 目录中,
我使用 http://docs.rubygems.org/read/chapter/3
我的环境显示:
rvm 1.10.0
ruby 1.9.3p0
gem 1.8.12
那么,为什么“gem 环境”显示:
RubyGems Environment:
- RUBYGEMS VERSION: 1.8.12
- RUBY VERSION: 1.9.2 (2010-08-18 patchlevel 0) [i686-linux]
- INSTALLATION DIRECTORY: /usr/lib/ruby/gems/1.9.1
- RUBY EXECUTABLE: /usr/bin/ruby1.9.1
- EXECUTABLE DIRECTORY: /usr/bin
- RUBYGEMS PLATFORMS:
- ruby
- x86-linux
- GEM PATHS:
- /usr/lib/ruby/gems/1.9.1
- /home/zenph/.gem/ruby/1.9.1
我可以尝试什么解决这个问题?
It seems this process is far harder than it should be.
Currently, I have ruby 1.9.2 installed manually. I wanted to update this to use RVM. So I installed that successfully, and then installed 1.9.3-p0, which is in my RVM directory under /zenph/.rvm
I upgraded rubygems using http://docs.rubygems.org/read/chapter/3
And my environment shows:
rvm 1.10.0
ruby 1.9.3p0
gem 1.8.12
So, why does "gem environment" show:
RubyGems Environment:
- RUBYGEMS VERSION: 1.8.12
- RUBY VERSION: 1.9.2 (2010-08-18 patchlevel 0) [i686-linux]
- INSTALLATION DIRECTORY: /usr/lib/ruby/gems/1.9.1
- RUBY EXECUTABLE: /usr/bin/ruby1.9.1
- EXECUTABLE DIRECTORY: /usr/bin
- RUBYGEMS PLATFORMS:
- ruby
- x86-linux
- GEM PATHS:
- /usr/lib/ruby/gems/1.9.1
- /home/zenph/.gem/ruby/1.9.1
What can I try to resolve this?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
要查看哪个 Ruby 是默认的,请打开终端并使用:
要指定 Ruby 作为默认值,请打开终端并使用:
文档
To see which Ruby is the default one, open a terminal and use:
To specify a Ruby to be the default , open a terminal and use:
Docs