[英]RVM using wrong ruby version
I had problems with ruby and in the process of fixing it I installed a newer version. 我在使用ruby时遇到问题,在修复它的过程中,我安装了新版本。 However, when I open up a terminal window and type
ruby -v
, I get - ruby 2.0.0p247 (2013-06-27 revision 41674) [x86_64-darwin13.2.0]
但是,当我打开终端窗口并键入
ruby -v
,我得到ruby 2.0.0p247 (2013-06-27 revision 41674) [x86_64-darwin13.2.0]
This version is corrupt (eg I can't run rails s) 此版本已损坏(例如,我无法运行rails)
If I run this command: rvm --default use ruby-2.1.4
, then everything is right in the world and I'm good... until I open a new terminal window. 如果我运行以下命令:
rvm --default use ruby-2.1.4
,那么世界上一切都很好,我很好...直到打开新的终端窗口。
Can someone help me understand where I set my default version to 2.1.4? 有人可以帮助我了解我将默认版本设置为2.1.4的位置吗?
I faced the same problem after a fresh install of my OS, selecting Run command as a login shell
in my terminal solved the problem. 全新安装操作系统后,我遇到了同样的问题,在终端中选择
Run command as a login shell
解决了该问题。
Terminal >
Edit >
Profile Preference >
Title and Command >
(Check) **Run command as a login shell**
Restart Terminal
Login shells (typically when a terminal window is opened) will use
.bash_profile
but interactive, non-login shells reference.bashrc
(likely where the rvm shell code are loaded).登录外壳程序(通常在打开终端窗口时)将使用
.bash_profile
但交互式非登录外壳程序将引用.bashrc
(可能是rvm Shell代码的加载位置)。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.