ruby - 执行 rvm 时获取 "Warning! PATH is not properly set up"使用 2.0.0 --default

标签 ruby rvm ruby-2.0 bash

上面的第一次不起作用,第二次起作用。

尝试为任何新的 shell 窗口将 ruby​​ 版本设置为 2.0.0。

$ rvm use 2.0.0 --default

给予

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

然后做同样的事情

$ rvm use 2.0.0 --default

现在没有错误,即

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

但新窗口仍然给我 ruby​​ 1.9.3,而不是 2.0.0

我的 .bashrc 文件中有:

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

我的 .bash_profile 有:

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

尝试

rvm get stable

似乎有效,但在大量绿色输出结束时显示:

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

带有 rvm list rubies 的新终端窗口显示:

$ 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

最佳答案

我用

卸载 rvm 后卡住了
rvm implode

然后在重新安装 rvm 后,它收到了相同的错误消息。 在浏览了 wayne seguin 的 git hub 页面之后。他在他的页面上列出了工具并推荐使用

rvm reset 

安装后。这修复了我的错误消息。无需修改 PATH。

关于ruby - 执行 rvm 时获取 "Warning! PATH is not properly set up"使用 2.0.0 --default,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/18276701/

相关文章:

html - CSS 样式表无法使用 Ruby on Rails:Sprockets::Rails::Helper::AssetNotFound 错误

mysql - 尝试为 rails 安装 mysql 支持时出错

ruby-on-rails - 安装 rvm 时遇到问题

ruby - 使用 RVM 修复 Mac OS Sierra 上未初始化的常量 OpenSSL::Digest::DSS

ruby - Ruby 中 Kernel#eval 和 Binding#eval 的区别

ruby - 使用 ruby​​(使用 Addressable Gem)显示来自规范化 URI 的 IDN

ruby-on-rails - 如何获得在 Ubuntu 中写入 gem 目录的权限?

ruby - 通过引用文档进行 Mongoid 查询

ruby - 在 OS X 10.7 上使用 RVM fork 循环安装 Ruby 1.9.3

ruby-on-rails - 无法在 Windows Server 2003 上使用 mysql2 运行 Rails 服务器