1.rbenvをgitより取ってくる。
git clone https://github.com/sstephenson/rbenv.git ~/.rbenv
2.環境設定
echo 'export PATH="$HOME/.rbenv/bin:$PATH"' >> ~/.bash_profile echo 'eval "$(rbenv init -)"' >> ~/.bash_profile source .bash_profile
rbenvの確認 rbenv --version 3.ruby-build を インストール(clone)する
git clone https://github.com/sstephenson/ruby-build.git ~/.rbenv/plugins/ruby-build rbenv install --list
4.指定バージョンのRubyをインストール
rbenv install -v 2.2.3