LoginSignup
3
3

More than 5 years have passed since last update.

rbenv使い方メモメモ

Posted at

jrubyとrubyを混合で使うことになったので自分用のメモ。
随時更新します。

環境

  • CentOS 6.5
  • rbenv 0.4.0-129-g7e0e85b

メモ

rbenvのインストール方法(CentOS)

rbenvのバージョン確認

rbenv -v

インストール可能な一覧表示

rbenv install -l 

インストール

rbenv install バージョン

アンインストール

rbenv uninstall バージョン

利用中のrubyバージョン

rbenv version

インストールされているrubyバージョン一覧

rbenv versions

デフォルトで利用するバージョン指定

rbenv global バージョン

実行シェルでのみ利用したいバージョンを指定

rbenv shell バージョン

カレントディレクトリで利用したいバージョンを指定

rbenv local バージョン

利用中のrubyを外したい場合

rbenv local --unset #or system
rbenv shell --unset #or system
rbenv global system #globalはsystemしか指定できないっぽい

利用中のrubyのパス

rbenv which ruby

利用中のrubyに対応するgem内のコマンドラインツールを利用可能にする

rbenv rehash

利用しているrubyにおけるgemのインストール先を表示

gem env

参考URL

ほぼパクリです。ありがとうございます。
http://qiita.com/a_ishidaaa/items/8cc14453289dba1413dd

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