rbenv 不改变 ruby 版本 - rbenv not changing ruby version

问题:

I installed rbenv according to the github directions.我根据github的说明安装了rbenv。 I am running OSX but I have tried this on a Ubuntu 12.04 VM and got the same results.我正在运行 OSX,但我已经在 Ubuntu 12.04 VM 上尝试过,并得到了相同的结果。 The following is what i get in my terminal when I try to change ruby versions:以下是我尝试更改 ruby​​ 版本时在终端中得到的信息:

rbenv versions
* 1.9.3-p0 (set by /Users/user/.rbenv/version)
1.9.3-p125

rbenv global
1.9.3-p0

rbenv rehash

ruby -v
ruby 1.8.7 (2011-12-28 patchlevel 357) [universal-darwin11.0]

which ruby
/usr/bin/ruby

Anyone have any ideas as to why rbenv isn't switching the ruby version like it thinks it is?任何人都知道为什么 rbenv 没有像它认为的那样切换 ruby​​ 版本? Also there is no .rbenv file in the local directory that would be causing the ruby version to default to 1.8.7本地目录中也没有 .rbenv 文件会导致 ruby​​ 版本默认为 1.8.7

rbenv local
rbenv: no local version configured for this directory

解决方案:

参考一: https://stackoom.com/question/juBU
参考二: rbenv not changing ruby version
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章