Ruby 和 RVM:意外的版本号

Ruby 和 RVM:意外的版本号

我正在使用 osx 10.8.4 并且已经安装了 brew。

我按照这里的 ruby​​/rvm 安装说明进行操作:http://octopress.org/docs/setup/rvm/

rvm install 1.9.3
rvm use 1.9.3
rvm rubygems latest

它运行时没有问题和错误。当我检查 ruby​​ 版本时,我得到了这个:

$ ruby --version
ruby 2.0.0p195 (2013-05-14 revision 40734) [x86_64-darwin12.4.0]

这不是我所期望的。RVM 是否自动安装了更高版本的 ruby​​?

这是 rvminfo

$ rvm info

ruby-2.0.0-p195:

  system:
    uname:       "Darwin mbp002.local 12.4.0 Darwin Kernel Version 12.4.0: Wed May  1 17:57:12 PDT 2013; root:xnu-2050.24.15~1/RELEASE_X86_64 x86_64"
    system:      "osx/10.8/x86_64"
    bash:        "/bin/bash => GNU bash, version 3.2.48(1)-release (x86_64-apple-darwin12)"
    zsh:         "/bin/zsh => zsh 4.3.11 (i386-apple-darwin12.0)"

  rvm:
    version:      "rvm 1.20.13 (stable) by Wayne E. Seguin <[email protected]>, Michal Papis <[email protected]> [https://rvm.io/]"
    updated:      "53 minutes 28 seconds ago"

  ruby:
    interpreter:  "ruby"
    version:      "2.0.0p195"
    date:         "2013-05-14"
    platform:     "x86_64-darwin12.4.0"
    patchlevel:   "2013-05-14 revision 40734"
    full_version: "ruby 2.0.0p195 (2013-05-14 revision 40734) [x86_64-darwin12.4.0]"

  homes:
    gem:          "/Users/antkong/.rvm/gems/ruby-2.0.0-p195"
    ruby:         "/Users/antkong/.rvm/rubies/ruby-2.0.0-p195"

  binaries:
    ruby:         "/Users/antkong/.rvm/rubies/ruby-2.0.0-p195/bin/ruby"
    irb:          "/Users/antkong/.rvm/rubies/ruby-2.0.0-p195/bin/irb"
    gem:          "/Users/antkong/.rvm/rubies/ruby-2.0.0-p195/bin/gem"
    rake:         "/Users/antkong/.rvm/gems/ruby-2.0.0-p195@global/bin/rake"

  environment:
    PATH:         "/Users/antkong/.rvm/gems/ruby-2.0.0-p195/bin:/Users/antkong/.rvm/gems/ruby-2.0.0-p195@global/bin:/Users/antkong/.rvm/rubies/ruby-2.0.0-p195/bin:/Users/antkong/.rvm/bin:/Users/antkong/.pythonbrew/bin:/usr/local/bin:/usr/local/share/python:/usr/bin:/bin:/usr/sbin:/sbin:/opt/X11/bin"
    GEM_HOME:     "/Users/antkong/.rvm/gems/ruby-2.0.0-p195"
    GEM_PATH:     "/Users/antkong/.rvm/gems/ruby-2.0.0-p195:/Users/antkong/.rvm/gems/ruby-2.0.0-p195@global"
    MY_RUBY_HOME: "/Users/antkong/.rvm/rubies/ruby-2.0.0-p195"
    IRBRC:        "/Users/antkong/.rvm/rubies/ruby-2.0.0-p195/.irbrc"
    RUBYOPT:      ""
    gemset:       ""

答案1

您确定rvm use 1.9.3工作正常并且没有显示错误吗?

您可以运行此命令以确保无误:

rvm use 1.9.3 && echo "Got 1.9.3" || echo "Failed switching ruby!"

相关内容