1
2

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.

Homebrewでrbenvインストール

Last updated at Posted at 2015-11-21

##インストール

いれてたと思ってたら入ってなかったのでbrew install。

brew update
brew install rbenv ruby-build

バージョン確認しようとしたら.rbenvがないとか言われる

➜  ~  rbenv -v
/Users/hogehoge/homebrew/Cellar/rbenv/0.4.0/libexec/rbenv---version: line 17: cd: /Users/hogehoge/.rbenv: No such file or directory

$RBENV_ROOTを設定すれば良いみたい。
自分の場合だと⇩こんな感じ

export RBENV_ROOT=$BREW_ROOT/rbenv/

##環境確認

➜  ~  rbenv -v
rbenv 0.4.0
➜  ~  rbenv install -l #インストール可能なバージョン一覧
➜  ~  rbenv install 2.2.3 #インストール
➜  ~  rbenv local 2.2.3 #カレントディレクトリで利用したいバージョンを指定
➜  ~  rbenv versions #インストールしているバージョン一覧
  system
* 2.2.3 (set by /Users/hogehoge/.ruby-version)
➜  ~  rbenv rehash
➜  ~  gem env
1
2
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
1
2

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?