production.log

株式会社リブセンスでエンジニアをやっている星直史のブログです。

rbenvを使用したrubyのバージョン管理と最新状態に保つ方法

概要

  • rbenvのインストールと設定
  • rubyのバージョンの最新を取得

rbenv インストール

$ git clone git://github.com/sstephenson/rbenv.git ~/.rbenv
$ mkdir -p ~/.rbenv/plugins
$ git clone https://github.com/sstephenson/ruby-build.git ~/.rbenv/plugins/ruby-build
$ echo 'export PATH="$HOME/.rbenv/bin:$PATH"' >> ~/.bash_profile
$ echo 'eval "$(rbenv init -)"' >> ~/.bash_profile

rbenvを入れているが、rbenv install -lので最新のrubyバージョンが出てこない場合

$ cd ~/.rbenv
$ git pull origin master
$ cd ~/.rbenv/plugins/ruby-build
$ git pull origin master