LoginSignup
32
31

More than 5 years have passed since last update.

rbenvでRuby2.2をインストールする。

Last updated at Posted at 2015-01-07

rbenvで最新のrubyバージョンをインストールした時の手順まとめ。

新しいrubyバージョンのインストール

ruby-builderをupgradeしてリストを更新してから、インストール

$ brew update
$ brew upgrade ruby-build

$ rbenv install --list
  2.1.3
  2.1.4
  2.1.5
  2.2.0-dev
  2.2.0-preview1
  2.2.0-preview2
  2.2.0-rc1
  2.2.0

$ rbenv install 2.2.0

bundlerをインストール

前のbundleだと以下のエラーがでる。updateもダメみたい。インストールをし直すといける。

bundlerはrubyのバージョンごとに管理されているようでエラーがでる。bundlerを新規にインストールする。

$ bundle install
rbenv: bundle: command not found

The `bundle' command exists in these Ruby versions:
  2.0.0-p481

$ gem update bundler
Updating installed gems
Nothing to update

$ gem install bundler
Fetching: bundler-1.7.11.gem (100%)
Successfully installed bundler-1.7.11
1 gem installed
$ bundle install
Fetching source index from https://rubygems.org/
Installing rake 10.3.2
Installing i18n 0.6.11

gemsetを作っている人は、新しく作成することも忘れずにね!!

32
31
3

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
32
31