4

我已经设置了我的默认 ruby​​ 版本

rvm use 1.9.3 --default

打开一个新终端时,我可以看到 rvm 记住了我的默认值,但是使用的是旧版本的 ruby​​:

Last login: Tue Jan 22 17:36:20 on ttys000
➜  ~  rvm list default

Default Ruby (for new shells)

   ruby-1.9.3-p374 [ x86_64 ]

➜  ~  ruby -v
ruby 1.8.7 (2012-02-08 patchlevel 358) [universal-darwin12.0]

➜  ~  rvm info

ruby-1.9.3-p374:

  system:
    uname:       "Darwin murzemac.local 12.2.0 Darwin Kernel Version 12.2.0: Sat Aug 25 00:48:52 PDT 2012; root:xnu-2050.18.24~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.17.10 () by Wayne E. Seguin <wayneeseguin@gmail.com>, Michal Papis <mpapis@gmail.com> [https://rvm.io/]"
    updated:      "14 hours 46 minutes 38 seconds ago"

  ruby:
    interpreter:  "ruby"
    version:      "1.8.7"
    date:         "2012-02-08"
    platform:     "universal-darwin12.0"
    patchlevel:   "2012-02-08 patchlevel 358"
    full_version: "ruby 1.8.7 (2012-02-08 patchlevel 358) [universal-darwin12.0]"

  homes:
    gem:          "/Users/murze/.rvm/gems/ruby-1.9.3-p374"
    ruby:         "/Users/murze/.rvm/rubies/ruby-1.9.3-p374"

  binaries:
    ruby:         "/usr/bin/ruby"
    irb:          "/usr/bin/irb"
    gem:          "/usr/bin/gem"
    rake:         "/usr/bin/rake"

  environment:
    PATH:         "/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/X11/bin:/Users/murze/.rvm/bin"
    GEM_HOME:     "/Users/murze/.rvm/gems/ruby-1.9.3-p374"
    GEM_PATH:     "/Users/murze/.rvm/gems/ruby-1.9.3-p374:/Users/murze/.rvm/gems/ruby-1.9.3-p374@global"
    MY_RUBY_HOME: "/Users/murze/.rvm/rubies/ruby-1.9.3-p374"
    IRBRC:        "/Users/murze/.rvm/rubies/ruby-1.9.3-p374/.irbrc"
    RUBYOPT:      ""
    gemset:       ""

打开一个新的终端窗口时如何自动激活1.9.3?

4

1 回答 1

0

我的默认设置也不总是正确设置,因此我将 .rvmrc 放在了我的终端打开的目录中(或在我的终端可能打开的目录中)和rvm use default里面。

于 2013-01-22T17:27:21.200 回答