2
3

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の導入と使い方

Last updated at Posted at 2014-04-03

rbenv

rubyのバージョンを使い分けることが出来る。

ruby-build

rbenvのプラグイン。rbenv installコマンドを提供する。

導入とglobalへのrubyのインストール

qiitaのこの投稿に書かれている通り。
http://qiita.com/s-yamaz@github/items/b38b330b44f517f3c77c

この投稿時のrubyは2.1.1が最新バージョン。

$ rbenv global 2.1.1

localへのrubyのインストール

参考サイト:
http://blog.axross.org/entry/2013/12/19/221625

localで使うバージョンを、あらかじめrbenvでインストールしておく必要がある。

$ rbenv install 1.9.3-p484

localコマンドでカレントディレクトリ内でのrubyのバージョンを決める。

$ ruby -v
ruby 2.1.1p76 (2014-02-24 revision 45161) [x86_64-darwin13.0]
$ rbenv local 1.9.3-p484
$ ruby -v
ruby 1.9.3p484 (2013-11-22 revision 43786) [x86_64-darwin13.1.0]

2
3
0

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
2
3

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?