如何在Mac OSX Yosemite中将Ruby版本2.0.0更新到最新版本? [英] How to update Ruby Version 2.0.0 to the latest version in Mac OSX Yosemite?

查看:84
本文介绍了如何在Mac OSX Yosemite中将Ruby版本2.0.0更新到最新版本?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要将我的ruby版本从2.0.0更新到最新版本,因为我的版本未更新,所以我无法使用某些gems. 一段时间之前,我曾使用Homebrew安装Ruby,如何更新Ruby版本?

I need to update my ruby version from 2.0.0 to the latest version, I can not use some gems because my version is not updated. I had used Homebrew to install Ruby some time ago, How can i update my Ruby version?

推荐答案

打开终端并运行

curl -sSL https://raw.githubusercontent.com/rvm/rvm/master/binscripts/rvm-installer | bash -s stable

完成此操作后,您需要重新启动终端,以使rvm命令起作用.

When this is complete, you need to restart your terminal for the rvm command to work.

现在,运行rvm list known

这显示了红宝石的版本列表.

This shows the list of versions of the ruby.

现在,运行rvm install ruby@latest以获得最新的红宝石版本.

Now, run rvm install ruby@latest to get the latest ruby version.

如果在终端中键入ruby -v,则应该看到ruby X.X.X.

If you type ruby -v in the terminal, you should see ruby X.X.X.

如果仍然显示您ruby 2.0.,请运行rvm use ruby-X.X.X --default.

If it still shows you ruby 2.0., run rvm use ruby-X.X.X --default.

这篇关于如何在Mac OSX Yosemite中将Ruby版本2.0.0更新到最新版本?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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