今天下午我不得不重新安装 RVM,但仍然在为以下问题苦苦挣扎 - 当我加载一个新的终端窗口(iTerm2 Build 1.0.0.20130624
with zsh 4.3.9 (i386-apple-darwin10.0)
)时,rvm“忘记”我的 gemset 数据。
这是一个相当普遍的问题,但我尝试过的一切都没有奏效。我已经这样做了create
(因为已经制作了 gemset,所以省略了):
rvm use --default 2.0.0@<gemset_name>
这显然不起作用,因为我使用的是 ZSH :
Command: /bin/bash --login
所以然后我尝试了这个,专门针对 ZSH,但这也不起作用 - 打开 iTerm 时出现以下错误:
## exec failed ##
argpath=/usr/local/bin/zsh error=No such file or directory
我将 iTerm 首选项中的命令更改为
~/.zlogin -l
因为我已将其添加到.zlogin
[[ -s "$HOME/.rvm/scripts/rvm" ]] && source "$HOME/.rvm/scripts/rvm"
这也不起作用,抛出此错误:
## exec failed ##
argpath=/Users/<username>/.zlogin error=Permission denied
因此,我将“登录 Shell”切换回""
iTerm 首选项(这样它就可以正常加载)并在命令行中尝试了这个:
$ source $HOME/.rvm/scripts/rvm
这给了我
source: no such file or directory: /Users/<username>/.rvm/scripts/rvm
所以现在我真的很困惑。为什么我的目录中没有 .rvm ~
?
最后,这是rvm info
重新打开 iTerm 后的结果:
system:
system:
uname: "Darwin <users>-MacBook-Pro.local 10.8.0 Darwin Kernel Version 10.8.0: Tue Jun 7 16:33:36 PDT 2011; root:xnu-1504.15.3~1/RELEASE_I386 i386"
system: "osx/10.6/i386"
bash: "/bin/bash => GNU bash, version 3.2.48(1)-release (x86_64-apple-darwin10.0)"
zsh: "/bin/zsh => zsh 4.3.9 (i386-apple-darwin10.0)"
rvm:
version: "rvm 1.21.16 () by Wayne E. Seguin <wayneeseguin@gmail.com>, Michal Papis <mpapis@gmail.com> [https://rvm.io/]"
updated: "3 hours 33 minutes 38 seconds ago"
path: "/usr/local/rvm"
homes:
gem: "not set"
ruby: "/usr/local/rvm/rubies/ruby-2.0.0-p247"
binaries:
ruby: "/usr/local/rvm/rubies/ruby-2.0.0-p247/bin/ruby"
irb: "/usr/local/rvm/rubies/ruby-2.0.0-p247/bin/irb"
gem: "/usr/local/rvm/rubies/ruby-2.0.0-p247/bin/gem"
rake: "/usr/local/rvm/gems/ruby-2.0.0-p247@global/bin/rake"
environment:
PATH: "/usr/local/rvm/gems/ruby-2.0.0-p247@<gemset>/bin:/usr/local/rvm/gems/ruby-2.0.0-p247@global/bin:/usr/local/rvm/rubies/ruby-2.0.0-p247/bin:/usr/local/rvm/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/local/git/bin:/usr/X11/bin:/Users/<username>/.rvm/bin"
GEM_HOME: ""
GEM_PATH: ""
MY_RUBY_HOME: "/usr/local/rvm/rubies/ruby-2.0.0-p247"
IRBRC: "/usr/local/rvm/rubies/ruby-2.0.0-p247/.irbrc"
RUBYOPT: ""
gemset: ""