LoginSignup
4
4

More than 5 years have passed since last update.

完全に覚え書き:rbenvでインストールするrubyの更新

Posted at

rbenv install -l で確認

環境はMacOSです。
rbenvのrubyのバージョンを上げたいなと思ったら...

% rbenv install -l
Available versions:
  1.8.6-p383
  # 中略 
  2.0.0-rc1
  2.0.0-rc2
  2.1.0-dev
  2.1.0-preview1
  jruby-1.5.6
  jruby-1.6.3
  # 以下略……

ruby2.1がこのままだと選択できない。

ruby-buildをupgradeする

% sudo brew update
Password:
Already up-to-date.
% brew upgrade ruby-build
==> Upgrading 1 outdated package, with result:
ruby-build 20140225
==> Upgrading ruby-build
==> Installing ruby-build dependency: openssl
==> Downloading https://downloads.sf.net/project/machomebrew/Bottles/
# 以下略

これで、rbenv install -lすると、インストールできるバージョンが増えていた!
もう2.1.1なんですね...

% rbenv install -l
Available versions:
  1.8.6-p383
  # 中略
  2.0.0-rc1
  2.0.0-rc2
  2.1.0
  2.1.0-dev
  2.1.0-preview1
  2.1.0-preview2
  2.1.0-rc1
  2.1.1
  2.2.0-dev
  jruby-1.5.6
  jruby-1.6.3
  # 以下略

ということで、2.1.1 にしました。

% rbenv install 2.1.1
Downloading ruby-2.1.1.tar.gz...
-> http://dqw8nmjcqpjn7.cloudfront.net/e57fdbb8ed56e70c43f39c79da1654b2
Installing ruby-2.1.1...
Installed ruby-2.1.1 to /Users/takano/.rbenv/versions/2.1.1

% ruby -v
ruby 2.1.1p76 (2014-02-24 revision 45161) [x86_64-darwin12.0]
4
4
1

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
4
4