在运行Snow Leopard 10.6.5的Mac OS上升级Ruby安装 [英] Upgrading Ruby installation on Mac OS running Snow Leopard 10.6.5
本文介绍了在运行Snow Leopard 10.6.5的Mac OS上升级Ruby安装的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我有一台运行Snow Leopard 10.6.5的Mac OS,并且我正在尝试升级我的Ruby安装.
I have a Mac Os running Snow Leopard 10.6.5 and I am trying to upgrade my Ruby installation.
在执行任何操作之前,我运行以下命令,并且得到以下结果:
Before I did anything, I run the following commands and I had the following results:
$ ruby -v
ruby 1.8.7 (2009-06-12 patchlevel 174) [universal-darwin10.0]
$ which ruby
/usr/bin/ruby
因此,要升级我的安装,我先安装了 macports ,然后使用 Ruby版本管理器(RVM).
So, to upgrade my installation, I installed first macports and then Ruby using Ruby Version Manager (RVM).
1. bash < <(curl http://rvm.beginrescueend.com/releases/rvm-install-head)
2. mkdir -p ~/.rvm/src/ && cd ~/.rvm/src && rm -rf ./rvm/ && git clone --depth 1 git://github.com/wayneeseguin/rvm.git && cd rvm && ./install
3. rvm install 1.9.2
4. rvm 1.9.2 --default
之后,我运行以下命令,并得到以下结果:
After that, I run the following commands and I had the following results:
$ ruby -v
ruby 1.8.7 (2009-06-12 patchlevel 174) [universal-darwin10.0]
$ which ruby
/usr/bin/ruby
$ rvm list
=> ruby-1.9.2-p136 [ x86_64 ]
为什么Ruby仍然是1.8.7?怎么了?或者,我忘记了什么?
推荐答案
已解决:
在主目录中编辑" .profile "文件:
Edit the '.profile' file in home directory:
在底部添加一行:
export PATH="/usr/local/bin:/usr/local/sbin:/usr/local/mysql/bin:$PATH"
,然后在终端中运行
source ~/.profile
设置更改.
这篇关于在运行Snow Leopard 10.6.5的Mac OS上升级Ruby安装的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文