在Mac OS X上升级Ruby [英] Upgrading Ruby on Mac OS X

查看:273
本文介绍了在Mac OS X上升级Ruby的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在阅读《编程Ruby》一书,并希望在计算机上升级Ruby的版本.我运行Mac OS X Snow Leopard,并在命令行中执行ruby -v显示我正在运行Ruby 1.8.7.

I am reading the book Programming Ruby and am looking to upgrade the version of Ruby on my computer. I run Mac OS X Snow Leopard and doing ruby -v in the command line shows I am running Ruby 1.8.7.

我安装了MacPorts并运行了sudo port install ruby​​19命令,但是每当我键入ruby -v时,它仍然显示Ruby 1.8.7.

I installed MacPorts and ran the sudo port install ruby19 command but whenever I type ruby -v, it still shows Ruby 1.8.7.

有人可以帮忙吗?谢谢.

Could anyone help with this? Thank you.

推荐答案

"rvm"工具非常好.我认为它代表Ruby Verson Manager,并且开发人员擅长在irc渠道中提供支持.您可以并排安装多个版本的红宝石,选择要使用的版本.

The tool "rvm" is pretty good. It stands for Ruby Verson Manager I think, and the developer is good at support in the irc channels. You can install multiple versions of ruby along side each other pick the ones you want to use.

http://rvm.io

这篇关于在Mac OS X上升级Ruby的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆