获得"警告!路径没有正确设置"做RVM 2.0.0使用时--default [英] Getting "Warning! PATH is not properly set up" when doing rvm use 2.0.0 --default

查看:1814
本文介绍了获得"警告!路径没有正确设置"做RVM 2.0.0使用时--default的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

以上不工作第一次,第二次工作时间。

尝试红宝石版本设置为2.0.0任何新的shell窗口。

  $ RVM使用2.0.0 --default

 警告!路径没有正确设置,/home/durrantm/.rvm/gems/ruby-1.9.3-p125/
本'是不是在首位,
         通常这是由shell初始化文件引起的 - 检查它们的
PATH = ...项,
         这也可能有助于RVM重新添加到您的点文件:RVM得到稳定--au
对点文件',
         在这个shell会话运行临时固定:'RVM使用Ruby-1.9.3-P125

使用/home/durrantm/.rvm/gems/ruby-2.0.0-p247

然后做同样的

  $ RVM使用2.0.0 --default

现在给出任何错误,即

  $ RVM使用2.0.0 --default
使用/home/durrantm/.rvm/gems/ruby-2.0.0-p247
durrantm ... / durrantm $

但新的窗口仍然给我红宝石1.9.3,2.0.0不

我的的.bashrc 文件中有:

  PATH = $ PATH:$ HOME / .rvm / bin中#添加RVM到PATH的脚本
[-s/home/durrantm/.rvm/scripts/rvm]]&放大器;&安培; 。 /home/durrantm/.rvm/scripts/rvm

我的.bash_profile文件有:

 源〜/ .profile文件
案例$ - 在* I *)。在〜/ .bashrc ;; ESAC

尝试

  RVM得到良好

似乎工作,但在很多绿色输出的结尾显示:

 无法更新RVM,得到一些帮助在#rvm IRC频道在Freenode的服务器。

RVM列表红宝石一个新的终端窗口显示了这个:

  $ RVM红宝石名单
警告!路径没有正确设置,/home/durrantm/.rvm/gems/ruby-1.9.3-p125/bin'不是在首位,
         通常这是由shell初始化文件引起的 - 检查它们的PATH = ...项,
         这也可能有助于RVM重新添加到您的点文件:RVM获得稳定--auto-点文件',
         临时固定在这个shell会话运行:RVM使用Ruby-1.9.3-P125。RVM红宝石= GT;红宝石1.9.3-P125 [x86_64的]
   红宝石1.9.3-P194 [x86_64的]
 *红宝石2.0.0-P247 [x86_64的]#=> - 当前
#= * - 当前和放大器;&安培;默认
#* - 默认


解决方案

答案是把这个:

  [-s$ HOME / .rvm /脚本/ RVM]]&放大器;&安培;来源$ HOME / .rvm /脚本/ RVM
#加载RVM到一个shell会话*作为功能*

**底部** - 我的.bashrc文件中(最后一行很重要!)。我曾在我的.bash_profile文件(我是在Ubuntu),以及只有部分工作导致混乱的错误。

Above doesn't work first time, works 2nd time.

Try to set ruby version to 2.0.0 for any new shell windows.

Doing

$ rvm use 2.0.0 --default

gives

Warning! PATH is not properly set up, '/home/durrantm/.rvm/gems/ruby-1.9.3-p125/
bin' is not at first place,
         usually this is caused by shell initialization files - check them for '
PATH=...' entries,
         it might also help to re-add RVM to your dotfiles: 'rvm get stable --au
to-dotfiles',
         to fix temporarily in this shell session run: 'rvm use ruby-1.9.3-p125'
.
Using /home/durrantm/.rvm/gems/ruby-2.0.0-p247

Then doing the same

$ rvm use 2.0.0 --default

now gives no error, i.e.

$ rvm use 2.0.0 --default
Using /home/durrantm/.rvm/gems/ruby-2.0.0-p247
durrantm.../durrantm$ 

but new windows are still giving me ruby 1.9.3, not 2.0.0

My .bashrc file has in it:

PATH=$PATH:$HOME/.rvm/bin # Add RVM to PATH for scripting
[[ -s "/home/durrantm/.rvm/scripts/rvm" ]] && . "/home/durrantm/.rvm/scripts/rvm"

My .bash_profile has:

source ~/.profile
case $- in *i*) . ~/.bashrc;; esac

Trying

rvm get stable

seems to work but at the end of a lot of green output shows:

Could not update RVM, get some help at #rvm IRC channel at freenode servers.

A new terminal windows with rvm list rubies shows this:

$ rvm list rubies
Warning! PATH is not properly set up, '/home/durrantm/.rvm/gems/ruby-1.9.3-p125/bin' is not at first place,
         usually this is caused by shell initialization files - check them for 'PATH=...' entries,
         it might also help to re-add RVM to your dotfiles: 'rvm get stable --auto-dotfiles',
         to fix temporarily in this shell session run: 'rvm use ruby-1.9.3-p125'.

rvm rubies

=> ruby-1.9.3-p125 [ x86_64 ]
   ruby-1.9.3-p194 [ x86_64 ]
 * ruby-2.0.0-p247 [ x86_64 ]

# => - current
# =* - current && default
#  * - default

解决方案

The answer was to put this:

[[ -s "$HOME/.rvm/scripts/rvm" ]] && source "$HOME/.rvm/scripts/rvm" 
# Load RVM into a shell session *as a function*

**at the BOTTOM** (last line - important!) of my .bashrc file. I had it in my .bash_profile file (I am on Ubuntu) and that only partially worked leading to the confusing errors.

这篇关于获得"警告!路径没有正确设置"做RVM 2.0.0使用时--default的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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