RVM在ZSH中不起作用 [英] RVM is not working in ZSH

查看:185
本文介绍了RVM在ZSH中不起作用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想在Mac上试用ZSH shell,但是我也做了很多Ruby和Rails开发,所以我也相当多地使用RVM.问题是我似乎无法让RVM在ZSH中工作,并且在默认的Bash shell中可以正常工作:

I'd like to try out the ZSH shell on my Mac, but I also do a lot of Ruby and Rails development, so I use RVM quite a bit too. The problem is that I can't seem to get RVM to work in ZSH, and it's working fine in the default Bash shell:

> zsh
> rvm 1.9.2
> ruby -v
ruby 1.8.7 (2009-06-12 patchlevel 174) [universal-darwin10.0]
> which ruby
/usr/bin/ruby

我绝对可以确认已安装RVM,以及RVM下的ruby 1.9.2;我一直在Bash中使用它.有趣的是,在ZSH中运行rvm list会显示以下内容:

I can definitely confirm that RVM is installed, as well as ruby 1.9.2 under RVM; I use it all the time in Bash. Running an rvm list in ZSH shows this, interestingly:

rvm rubies

   ruby-1.8.7-p302 [ x86_64 ]
=> ruby-1.9.2-p0 [ x86_64 ]

这在我的iMac和MacBook Pro上都在发生.我在两者上都使用OS X 10.6.6,在iMac上使用ZSH 4.3.9(在笔记本电脑上为4.3.10).还没有像oh-my-zsh这样的幻想.

This is happening on both my iMac and MacBook Pro. I am using OS X 10.6.6 on both, ZSH 4.3.9 on the iMac (4.3.10 on the laptop). Nothing fancy like oh-my-zsh just yet.

我尝试查看RVM的网站上的文档,但没有任何帮助. /p>

I tried looking at the documentation on RVM's website, but nothing helped me there.

推荐答案

您的〜/.zshrc 中是否有此行?

[[ -s "$HOME/.rvm/scripts/rvm" ]] && . "$HOME/.rvm/scripts/rvm" 

这篇关于RVM在ZSH中不起作用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆