我使用RVM安装了ruby 1.9.2,但是当我键入"ruby​​ -v"时,告诉我我的红宝石v是1.8.7(mac) [英] i installed ruby 1.9.2 with RVM, but when i type "ruby -v" is telling me the ruby v i have is 1.8.7 (mac)

查看:68
本文介绍了我使用RVM安装了ruby 1.9.2,但是当我键入"ruby​​ -v"时,告诉我我的红宝石v是1.8.7(mac)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当我在三叉戟"rvm列表"中书写时,我得到以下信息:

when i write in the treminal "rvm list" i get this:

rvm rubies

   ruby-1.9.1-p378 [ x86_64 ]
   ruby-1.9.2-p136 [ x86_64 ]

但是当我键入"ruby​​ -v"时,我得到了:

but when i type "ruby -v" i get this:

ruby 1.8.7 (2009-06-12 patchlevel 174) [universal-darwin10.0]

我应该怎么做?

推荐答案

您是否尝试过rvm use 1.9.2?安装红宝石并不能使它们成为红宝石的可执行版本.如果您告诉RVM,请使用rvm use 1.9.2rvm use 1.9.1

Have you tried rvm use 1.9.2? Installing rubies does not make them the executable version of ruby. RVM will only make ruby the 1.9.2 version if you tell it to, with rvm use 1.9.2 or rvm use 1.9.1

如果您希望rvm默认使用1.9.2,请使用rvm --default use 1.9.2

If you want rvm to use 1.9.2 by default, use rvm --default use 1.9.2

这篇关于我使用RVM安装了ruby 1.9.2,但是当我键入"ruby​​ -v"时,告诉我我的红宝石v是1.8.7(mac)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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