为什么RVM尝试使用'rvm install'命令安装Rubygems而不是Ruby?

时间:2013-11-28 17:02:19

标签: ruby rvm

我正在尝试在我的Debian服务器上安装Ruby 2.0,并决定通过RVM执行此操作。我使用以下方式下载了它:

~$ \curl -L https://get.rvm.io | bash -s stable

但是当我尝试安装Ruby时,看起来RVM正在尝试安装Rubygems。

~$ rvm install 2.0.0
=> 'ruby' was not found, cannot install rubygems unless ruby is present (Do you have an RVM ruby installed & selected?)

我已经检查了RVM文档,rvm install <ruby version>绝对是安装Ruby的命令,而不是Rubygems。那么为什么上面的问题出现了呢?谢谢!

编辑:

'rvm info'的输出: [name]@debian-server:~/.rvm/rubies$ rvm info

system:
uname:       "Linux debian-server 3.2.0-4-amd64 #1 SMP Debian 3.2.41-2+deb7u2 x86_64 GNU/Linux"
system:      "debian/7/x86_64"
bash:        "/bin/bash => GNU bash, version 4.2.37(1)-release (x86_64-pc-linux-gnu)"
zsh:         " => not installed"

rvm:
version:      "rvm 1.24.5 (stable) by Wayne E. Seguin <wayneeseguin@gmail.com>, Michal Papis <mpapis@gmail.com> [https://rvm.io/]"
updated:      "33 minutes 56 seconds ago"
path:         "/home/[name]/.rvm"

homes:
gem:          "not set"
ruby:         "not set"

binaries:
ruby:         ""
irb:          ""
gem:          ""
rake:         "/home/[name]/.rvm/bin/rake"

environment:
PATH:              "/usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games:/home/[name]/.rvm/bin"
GEM_HOME:     ""
GEM_PATH:     ""
MY_RUBY_HOME: ""
IRBRC:        ""
RUBYOPT:      ""
gemset:       ""

system: uname: "Linux debian-server 3.2.0-4-amd64 #1 SMP Debian 3.2.41-2+deb7u2 x86_64 GNU/Linux" system: "debian/7/x86_64" bash: "/bin/bash => GNU bash, version 4.2.37(1)-release (x86_64-pc-linux-gnu)" zsh: " => not installed" rvm: version: "rvm 1.24.5 (stable) by Wayne E. Seguin <wayneeseguin@gmail.com>, Michal Papis <mpapis@gmail.com> [https://rvm.io/]" updated: "33 minutes 56 seconds ago" path: "/home/[name]/.rvm" homes: gem: "not set" ruby: "not set" binaries: ruby: "" irb: "" gem: "" rake: "/home/[name]/.rvm/bin/rake" environment: PATH: "/usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games:/home/[name]/.rvm/bin" GEM_HOME: "" GEM_PATH: "" MY_RUBY_HOME: "" IRBRC: "" RUBYOPT: "" gemset: ""

'rvm要求'的输出:

1 个答案:

答案 0 :(得分:1)

我不确定我是否理解你是如何达到这种情况的,但是如果你想通过RVM安装ruby 2.0,那么我建议如下:

rvm implode
\curl -L https://get.rvm.io | bash -s stable --ruby

然后确保使用〜/ .bash_profile(如安装输出中所述)来在每个新shell中加载RVM。