当我打开终端时,我看到:
Last login: Sun Aug 26 15:33:57 on ttys001
Using /Users/me/.rvm/gems/ruby-1.9.3-p125
Running /Users/me/.rvm/hooks/after_use
Using /Users/me/.rvm/gems/ruby-1.9.3-p194
ruRunning /Users/me/.rvm/hooks/after_use
me-MacBook:site me$ ruby -v
ruby 1.8.7 (2012-02-08 patchlevel 358) [universal-darwin12.0]
我想要 ruby 1.9.3 的地方。如果我然后输入:
rvm use 1.9.3 --default
我得到以下信息:
$ rvm use 1.9.3 --default
Using /Users/me/.rvm/gems/ruby-1.9.3-p194
Running /Users/me/.rvm/hooks/after_use
这允许我使用rails,但是当我重新打开终端时,我必须每次都这样做。有没有办法让它成为默认设置?我将它添加到我的 bash_profile 中,但这似乎不起作用。这是我的 bash 个人资料:
# Required for Ruby upgrade to 1.9.3
export RUBYOPT=-r openssl
export PATH=${PATH}:/opt/local/bin
[[ -s "$HOME/.rvm/scripts/rvm" ]] && . "$HOME/.rvm/scripts/rvm" # Load RVM function
# Sets the RVM profile on terminal load
rvm use ruby-1.9.3-p125
rvm use 1.9.3 --default
# RVM Requirements
export CC="/usr/local/bin/gcc-4.2"
export CFLAGS="-O2 -arch x86_64"
export LDFLAGS="-L/opt/local/lib"
export CPPFLAGS="-I/opt/local/include"
export ARCHFLAGS="-arch i386"
# Postgresql
export PATH=/usr/bin:$PATH
有什么帮助吗?谢谢