我不知道为什么,但是RVM似乎无法更改默认的Ruby。我正在用哦,我的Zsh,尝试了我找到的所有东西,但似乎都没有用。
➜ Sites rvm use 2.0.0 --default
Using /Users/anahkiasen/.rvm/gems/ruby-2.0.0-p247
➜ Sites rvm list
rvm rubies
=* ruby-2.0.0-p247 [ x86_64 ]
# => - current
# =* - current && default
# * - default
➜ Sites rvm reload && rvm list
RVM reloaded!
rvm rubies
* ruby-2.0.0-p247 [ x86_64 ]
# => - current
# =* - current && default
# * - default现在Ruby被设置为默认值,但RVM不将其加载为"current",这意味着它不加载附属于它的宝石集。
➜ Sites rvm use 2.0.0
Using /Users/anahkiasen/.rvm/gems/ruby-2.0.0-p247
➜ Sites gem list
*** LOCAL GEMS ***
backports (3.3.3)
bson (1.9.1)
bson_ext (1.9.1)
bundler (1.3.5)
bundler-unload (1.0.1)
eventmachine (1.0.3)
genghisapp (2.3.7)
json (1.8.0)
mongo (1.9.0)
mustache (0.99.4)
rack (1.5.2)
rack-protection (1.5.0)
rack-test (0.6.2)
rake (10.1.0)
rubygems-bundler (1.2.2)
rvm (1.11.3.8)
sass (3.2.10)
sass-globbing (1.1.0)
sinatra (1.4.3)
sinatra-contrib (1.4.0)
sinatra-mustache (0.1.0)
tilt (1.4.1)
vegas (0.1.11)
➜ Sites rvm reload && gem list
RVM reloaded!
*** LOCAL GEMS ***
Nothing.我没有.bashrc,也没有.bash_profile。在我的.zprofile中没有RVM引用,下面是我的.zshrc:
# Path to your oh-my-zsh configuration.
ZSH=$HOME/.oh-my-zsh
# Set name of the theme to load.
ZSH_THEME="robbyrussell"
DEFAULT_USER="anahkiasen"
# Uncomment following line if you want red dots to be displayed while waiting for completion
COMPLETION_WAITING_DOTS="true"
# Which plugins would you like to load? (plugins can be found in ~/.oh-my-zsh/plugins/*)
plugins=(git bower brew composer gem laravel sublime)
## RVM and Rubygems
[[ -s "$HOME/.rvm/scripts/rvm" ]] && . "$HOME/.rvm/scripts/rvm"
source $ZSH/oh-my-zsh.sh我已经尝试过交换上面的两行,尝试将RVM加载移到.zprofile中,什么都没有。每次打开终端的新实例时,缺省值都会消失。它加载正确的红宝石,这意味着如果我做了ruby -v,我得到了我想要的版本,但对于RVM,它没有加载,因此我没有任何宝石集。
我也尝试过rvm --default use 2.0.0,rvm use 2.0.0@develop --default,但是结果是一样的。
我已经重新安装了RVM,我递归地设置了.rvm文件夹对当前用户的权限,没有。
我当时有点绝望。
发布于 2013-08-03 21:49:08
当您使用OH-MY-ZSH时,您可能遇到了类似于以下问题:https://github.com/robbyrussell/oh-my-zsh/pull/1359。
RVM有一个“修复”函数,运行:
rvm get head --auto-dotfiles它将重新组织您的点文件-这是重要的读取输出和遵循说明。
确保使用登录外壳以获得最佳效果。
https://stackoverflow.com/questions/18032970
复制相似问题