概要
MacOSX にrbenvをインストールする作業のメモ
rbenvのインストール
$ brew update
$ brew install rbenv ruby-build
$ echo 'eval "$(rbenv init -)"' >> ~/.bash_profile
$ source ~/.bash_profile
$ rbenv --version
rbenv 0.4.0
$ rbenv rehash
Rubyの2.3.1をインストールする
$ rbenv install --list
Available versions:
・
2.3.0
2.3.1
2.3.2
・
$ rbenv install 2.3.1
現在のRubyのバージョン確認
$ rbenv versions
1.9.3-p547
* 2.3.1 (set by /home/user/.rbenv/version)
Ruby バージョンの選択
$ rbenv global 2.3.1
$ rbenv version
2.3.1 (set by /home/hoge/.rbenv/version)
Bundlerのインストール
$ rbenv exec gem install bundler
node.jsのインストール
npmコマンドを使えるようにするために、node.jsをインストールする
$ brew install node
$ which npm
/usr/local/bin/npm