31
29

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

rbenvでRubyの切り替えあるある

Last updated at Posted at 2014-06-18

rbenvでRubyをインストールしてからrbenv global version_numberで切り替えるけど、適用されないあるある事例の自分用メモ。

$ ruby -v
ruby 2.0.0p451 (2014-02-24 revision 45167) [universal.x86_64-darwin13]

(´・ω・`)<なんでやねん

$ vi ~/.bash_profile

#PATHを通すおまじない
export PATH="$HOME/.rbenv/bin:$PATH"
eval "$(rbenv init -)"

:wq

#bashの設定ファイルを再読み込みするおまじない
$ source ~/.bash_profile

以上で、ruby -vで確認すると、

ruby 2.1.1p76 (2014-02-24 revision 45161) [x86_64-darwin13.0]

※Mavericksさんのデフォルトは2.0なので。
って感じに表示されればおk。

めでたしめでたし。

31
29
2

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
31
29

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?