I ran the command 'ruby -v' on my Linux Mint 10 virtual machine and got:
我在Linux Mint 10虚拟机上运行了'ruby -v'命令,得到了:
stapiagutierrez@Sergio-Linux-VM ~/Desktop/Tickets/tickets $ ruby -v
ruby 1.8.7 (2010-06-23 patchlevel 299) [i686-linux]
How can I upgrade it to the latest version, 1.9.2?
如何将其升级到最新版本1.9.2?
1 个解决方案
#1
31
I would suggest using RVM. That way you can keep the 1.8.7 version of Ruby, but you can also install new ones easily:
我建议使用RVM。这样你可以保留1.8.7版本的Ruby,但你也可以轻松地安装新版本:
rvm install 1.9.2
And switch between them with no effort:
并毫不费力地在它们之间切换:
rvm 1.8.7
rvm 1.9.2
Using rvm you can set your default version of Ruby like this:
使用rvm,您可以像这样设置Ruby的默认版本:
rvm --default use 1.9.2
#1
31
I would suggest using RVM. That way you can keep the 1.8.7 version of Ruby, but you can also install new ones easily:
我建议使用RVM。这样你可以保留1.8.7版本的Ruby,但你也可以轻松地安装新版本:
rvm install 1.9.2
And switch between them with no effort:
并毫不费力地在它们之间切换:
rvm 1.8.7
rvm 1.9.2
Using rvm you can set your default version of Ruby like this:
使用rvm,您可以像这样设置Ruby的默认版本:
rvm --default use 1.9.2