-2
我在哪裏,當我在Mac OS X中打開終端,然後鍵入ruby -v
一個問題,我得到:麻煩與更新紅寶石
➜ ~ ruby -v
ruby 1.8.7 (2012-02-08 patchlevel 358) [universal-darwin12.0]
我用RVM安裝更近的一個Ruby的版本,當我問它列出的Ruby安裝的版本,我得到:
➜ ~ rvm list
rvm rubies
=* ruby-1.9.3-p286 [ x86_64 ]
# => - current
# =* - current && default
# * - default
所以,我只需鍵入這個使用Ruby-1.9.3-P286:
➜ ~ rvm use ruby-1.9.3-p286
Using /Users/patrickestabrook/.rvm/gems/ruby-1.9.3-p286
➜ ~ ruby -v
ruby 1.9.3p286 (2012-10-12 revision 37165) [x86_64-darwin12.2.0]
問題是,當我註銷並再次打開終端時,它將我的Ruby版本設置回紅寶石1.8.7。我怎樣才能讓它停留在ruby-1.9.3-p286?
這沒有奏效。當我註銷並重新登錄時,它仍顯示我正在使用Ruby 1.8.7。呃這太討厭了! – 2013-02-11 19:47:56
你在'.bashrc'中有什麼關於'rvm'的? – codeit 2013-02-11 19:52:09
如果您的主目錄中有'.rvm'(rvm installed)。你應該在'.bashrc'中加入'[[-s「$ HOME/.rvm/scripts/rvm」]] && source「$ HOME/.rvm/scripts/rvm」來加載你的rvm到shell。 – codeit 2013-02-11 19:54:21