[英]Can't find correct version of ruby with rbenv?
I am working in OSX El Capitan. 我在OSX El Capitan工作。 I have put the following at the end of my
~/.bash_profile
, and restarted my terminal: 我将以下内容放在
~/.bash_profile
的末尾,并重新启动了终端:
export RBENV_ROOT=/usr/local/var/rbenv
if which rbenv > /dev/null; then eval "$(rbenv init -)"; fi
Then I have run the following, without any errors: 然后,我运行以下命令,没有任何错误:
brew install rbenv
brew install ruby-build
rbenv install 2.2.2
But when I try ruby --version
I see: 但是当我尝试
ruby --version
我看到:
ruby 2.0.0p648 (2015-12-16 revision 53162) [universal.x86_64-darwin15]
What am I doing wrong that means I see Ruby 2.0.0 not Ruby 2.2.2? 我在做什么错,这意味着我看到的是Ruby 2.0.0而不是Ruby 2.2.2?
These are my paths: 这些是我的路径:
~ $ which ruby
/usr/local/var/rbenv/shims/ruby
~ $ which rbenv
/usr/local/bin/rbenv
我认为您必须通过以下方式更改ruby版本:
rbenv shell 2.2.2
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.