[英]Received Warning message “Path set to RVM” after updating ruby version using rvm
Recently I tried to update my ruby version due to a warning message (see below). 最近我因为一条警告消息而尝试更新我的ruby版本(见下文)。
Now I get the following warning message when I start my iterm2: 现在,当我启动iterm2时,我收到以下警告消息:
Warning: PATH set to RVM ruby but GEM_HOME and/or GEM_PATH not set, see:
https://github.com/wayneeseguin/rvm/issues/3212
Does anyone know how to resolve this warning? 有谁知道如何解决此警告? It hasn't really impacted my work but it is a little unsettling. 它并没有真正影响我的工作,但它有点令人不安。
for your information: 供您参考:
1. I believed I ran rvm get stable
to get the latest ruby version. 我相信我跑了rvm get stable
来获得最新的ruby版本。
2. this is the warning message I was initially trying to resolve but it has not been resolved either: 2.这是我最初试图解决的警告信息,但它还没有得到解决:
warning: parser/current is loading parser/ruby21, which recognizes
warning: 2.1.5-compliant syntax, but you are running 2.1.2.
I am using 1. Mac OS X
2. iterm2
and 3. oh-my-zsh
shell 我正在使用1. Mac OS X
2. iterm2
和3. oh-my-zsh
shell
I had same issue with oh-my-zsh While installing rvm with option --rails, there was this warning: 我和oh-my-zsh有同样的问题在使用选项--rails安装rvm时,有这个警告:
This solution works for me: Open .zshrc
file, and find PATH line 这个解决方案适合我:打开.zshrc
文件,找到PATH行
change 更改
export PATH=/path/to/something
into 成
export PATH="$PATH:/path/to/something"
save it and do source ~/.zshrc
, Then it worked. 保存它并做source ~/.zshrc
,然后它工作。
If you find a line after User configuration
in the ~/.zshrc file like this: 如果在〜/ .zshrc文件中的User configuration
后找到一行,如下所示:
#export PATH="/Users/robinwen/.rvm/gems/ruby-1.9.3-p551@robin/bin:/Users/robinwen/.rvm/gems/ruby-1.9.3-p551@global/bin:/Users/robinwen/.rvm/rubies/ruby-1.9.3-p551/bin:/Users/robinwen/.rvm/bin:/usr/local/git/bin:/sw/bin:/usr/local/bin:/usr/local:/usr/local/sbin:/usr/local/mysql/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin/" #export PATH =“/ Users/robinwen/.rvm/gems/ruby-1.9.3-p551@robin/bin:/Users/robinwen/.rvm/gems/ruby-1.9.3-p551@global/bin:/用户/ robinwen / .rvm /红宝石/红宝石1.9.3-P551 /斌:/Users/robinwen/.rvm/bin:在/ usr /本地/ git的/ bin中:/ SW /斌:在/ usr / local / bin目录:在/ usr /地方:在/ usr / local / sbin中:在/ usr /本地/ MySQL的/斌:在/ usr / local / bin目录:在/ usr / bin中:/ bin中:/ usr / sbin目录:/ sbin目录:在/ usr / local / bin目录/”
You should comment this line, and add following line: 您应该对此行进行评论,并添加以下行:
export PATH=$PATH:$HOME/.rvm/bin # Add RVM to PATH for scripting export PATH = $ PATH:$ HOME / .rvm / bin#将RVM添加到PATH以进行脚本编写
Good luck! 祝好运!
Adding to @ymin's solution. 添加到@ ymin的解决方案。 For me, who ran rvm list
and did not have a current ruby selected, needs to manually select a ruby ie. 对我来说,谁运行rvm list
并且没有选择当前的ruby,需要手动选择ruby即。 rvm use ruby-2.1.x
, then fix zshrc path and run rvm get stable
. rvm use ruby-2.1.x
,然后修复zshrc路径并运行rvm get stable
。
As of Dec 19, 2014, sudo rvm
shows these PATH warnings when the root user's default shell is not supported . 截至2014年12月19日,当不支持 root用户的默认shell时, sudo rvm
显示这些PATH警告。
In this case of running sudo rvm
the solution is to use rvmsudo
. 在这种运行sudo rvm
的情况下,解决方案是使用rvmsudo
。
I have the same question 我也有同样的问题
my solution method is add 我的解决方法是添加
source /etc/profile.d/rvm.sh
in .zshrc 在.zshrc中
source .zshrc is ok 源.zshrc没问题
good luck for you! 祝你好运!
将[[-s“$ HOME / .rvm / scripts / rvm”]] && source“$ HOME / .rvm / scripts / rvm”添加到〜/ .zshrc的顶部而不是底部后我可以确认这已经解决了这个问题对我而言。
same issue here, add code below into ~/.zshrc
works for me. 同样的问题,在下面添加代码~/.zshrc
对我~/.zshrc
。
export GEM_HOME="$GEM_HOME:$HOME/.rvm/bin"
export GEM_PATH="$GEM_PATH:$HOME/.rvm/bin"
And then source ~/.zshrc
. 然后source ~/.zshrc
。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.