ruby 1.9.3-p448インストール

p448が出てこない → ruby-build更新

Ruby - rbenv のアップデート! - mk-mode BLOG
によるとruby-buildから古いとrbenv installの候補に新しいバージョンが出てこないとのことなのでアップデート。

$ brew upgrade ruby-build
==> Upgrading 1 outdated package, with result:
ruby-build 20130901
==> Upgrading ruby-build
==> Downloading https://github.com/sstephenson/ruby-build/archive/v20130901.tar.
######################################################################## 100.0%
==> ./install.sh
/usr/local/Cellar/ruby-build/20130901: 83 files, 368K, built in 2 seconds

ruby更新の度にいちいちgem入れ直すの面倒 → rbenv-default-gems使おう

ruby-buildを実行した際に指定したgemを同時に入れてくれるプラグインのようです
Rbenv-default-gemsを試してみた - akadama

入れてみます。

$ brew install rbenv-default-gems==> Downloading https://github.com/sstephenson/rbenv-default-gems/archive/v1.0.0
######################################################################## 100.0%
🍺  /usr/local/Cellar/rbenv-default-gems/1.0.0: 4 files, 16K, built in 2 seconds
必ずインストールするgemを指定する。

~/.rbenv/default-gemsに以下のgemを指定*1

bundler
pry
json
tapp
rspec
sinatra
clockwork
daemons
twitter
nokogiri
rmagick
image_optim
ruby-opencv
ruby-vips
lunchy
kindai

gemを入れる度にriだのrdocだの入れてほしくない → rubygemsの設定を変更

gemインストール時の--no-ri --no-rdoc のデフォルト化とインストール済みのri RDocの削除|DIGITAL SQUADブログ
に従って~/.gemrcに以下を指定。

gem: --no-ri --no-rdoc

ruby 1.9.3-p448インストール

やっとインストールです。

$ env CONFIGURE_OPTS="--with-readline-dir=`brew --prefix readline` --with-openssl-dir=`brew --prefix openssl`" rbenv install 1.9.3-p448
Downloading yaml-0.1.4.tar.gz...
-> http://dqw8nmjcqpjn7.cloudfront.net/36c852831d02cf90508c29852361d01b
Installing yaml-0.1.4...
Installed yaml-0.1.4 to /Users/hoge/.rbenv/versions/1.9.3-p448

Downloading ruby-1.9.3-p448.tar.gz...
-> http://www.dnsbalance.ring.gr.jp/pub/lang/ruby/1.9/ruby-1.9.3-p448.tar.gz
Installing ruby-1.9.3-p448...
Installed ruby-1.9.3-p448 to /Users/hoge/.rbenv/versions/1.9.3-p448

Fetching: bundler-1.3.5.gem (100%)
Successfully installed bundler-1.3.5
1 gem installed
Fetching: coderay-1.0.9.gem (100%)
Fetching: slop-3.4.6.gem (100%)
Fetching: method_source-0.8.2.gem (100%)
Fetching: pry-0.9.12.2.gem (100%)
Successfully installed coderay-1.0.9
Successfully installed slop-3.4.6
Successfully installed method_source-0.8.2
Successfully installed pry-0.9.12.2
4 gems installed
Fetching: json-1.8.0.gem (100%)
Building native extensions.  This could take a while...
Successfully installed json-1.8.0
1 gem installed
Fetching: thor-0.18.1.gem (100%)
Fetching: tapp-1.4.0.gem (100%)
Successfully installed thor-0.18.1
Successfully installed tapp-1.4.0
2 gems installed
Fetching: rspec-core-2.14.5.gem (100%)
Fetching: diff-lcs-1.2.4.gem (100%)
Fetching: rspec-expectations-2.14.2.gem (100%)
Fetching: rspec-mocks-2.14.3.gem (100%)
Fetching: rspec-2.14.1.gem (100%)
Successfully installed rspec-core-2.14.5
Successfully installed diff-lcs-1.2.4
Successfully installed rspec-expectations-2.14.2
Successfully installed rspec-mocks-2.14.3
Successfully installed rspec-2.14.1
5 gems installed
Fetching: rack-1.5.2.gem (100%)
Fetching: tilt-1.4.1.gem (100%)
Fetching: rack-protection-1.5.0.gem (100%)
Fetching: sinatra-1.4.3.gem (100%)
Successfully installed rack-1.5.2
Successfully installed tilt-1.4.1
Successfully installed rack-protection-1.5.0
Successfully installed sinatra-1.4.3
4 gems installed
Fetching: tzinfo-0.3.37.gem (100%)
Fetching: i18n-0.6.5.gem (100%)
Fetching: multi_json-1.7.9.gem (100%)
Fetching: minitest-4.7.5.gem (100%)
Fetching: atomic-1.1.13.gem (100%)
Building native extensions.  This could take a while...
Fetching: thread_safe-0.1.2.gem (100%)
Fetching: activesupport-4.0.0.gem (100%)
Fetching: clockwork-0.6.0.gem (100%)
Successfully installed tzinfo-0.3.37
Successfully installed i18n-0.6.5
Successfully installed multi_json-1.7.9
Successfully installed minitest-4.7.5
Successfully installed atomic-1.1.13
Successfully installed thread_safe-0.1.2
Successfully installed activesupport-4.0.0
Successfully installed clockwork-0.6.0
8 gems installed
Fetching: multipart-post-1.2.0.gem (100%)
Fetching: faraday-0.8.8.gem (100%)
Fetching: simple_oauth-0.2.0.gem (100%)
Fetching: twitter-4.8.1.gem (100%)
Successfully installed multipart-post-1.2.0
Successfully installed faraday-0.8.8
Successfully installed simple_oauth-0.2.0
Successfully installed twitter-4.8.1
4 gems installed
Fetching: mini_portile-0.5.1.gem (100%)
Fetching: nokogiri-1.6.0.gem (100%)
Building native extensions.  This could take a while...
Successfully installed mini_portile-0.5.1
Successfully installed nokogiri-1.6.0
2 gems installed
Fetching: rmagick-2.13.2.gem (100%)
Building native extensions.  This could take a while...
Successfully installed rmagick-2.13.2
1 gem installed
Fetching: fspath-2.0.5.gem (100%)
Fetching: image_size-1.1.3.gem (100%)
Fetching: exifr-1.1.3.gem (100%)
Fetching: progress-3.0.0.gem (100%)
Fetching: in_threads-1.2.0.gem (100%)
Fetching: image_optim-0.9.1.gem (100%)
Successfully installed fspath-2.0.5
Successfully installed image_size-1.1.3
Successfully installed exifr-1.1.3
Successfully installed progress-3.0.0
Successfully installed in_threads-1.2.0
Successfully installed image_optim-0.9.1
6 gems installed
Fetching: ruby-opencv-0.0.10.gem (100%)
Building native extensions.  This could take a while...
Successfully installed ruby-opencv-0.0.10
1 gem installed
Fetching: ruby-vips-0.3.6.gem (100%)
Building native extensions.  This could take a while...
Successfully installed ruby-vips-0.3.6
1 gem installed
Fetching: lunchy-0.7.0.gem (100%)
Successfully installed lunchy-0.7.0
1 gem installed
Fetching: zipruby-0.3.6.gem (100%)
Building native extensions.  This could take a while...
Fetching: kindai-2.4.3.gem (100%)
Successfully installed zipruby-0.3.6
Successfully installed kindai-2.4.3
2 gems installed

(daemonsを入れ忘れていたので後で追加した)

確認

まず切り替え。

$ rbenv global 1.9.3-p448 

いま入れているものを確認。

$ rbenv versions
  system
  1.9.3-p194
  1.9.3-p392
* 1.9.3-p448 (set by /Users/hoge/.rbenv/version)
  macruby-0.13

スイッチできてますね。
念のためrubyコマンドでも。

$ ruby -v
ruby 1.9.3p448 (2013-06-27 revision 41675) [x86_64-darwin11.4.2]

問題なしです。
ではgemのリストを。

$ gem list

*** LOCAL GEMS ***

activesupport (4.0.0)
atomic (1.1.13)
bigdecimal (1.1.0)
bundler (1.3.5)
clockwork (0.6.0)
coderay (1.0.9)
daemons (1.1.9)
diff-lcs (1.2.4)
exifr (1.1.3)
faraday (0.8.8)
fspath (2.0.5)
i18n (0.6.5)
image_optim (0.9.1)
image_size (1.1.3)
in_threads (1.2.0)
io-console (0.3)
json (1.8.0, 1.5.5)
kindai (2.4.3)
lunchy (0.7.0)
method_source (0.8.2)
mini_portile (0.5.1)
minitest (4.7.5, 2.5.1)
multi_json (1.7.9)
multipart-post (1.2.0)
nokogiri (1.6.0)
progress (3.0.0)
pry (0.9.12.2)
rack (1.5.2)
rack-protection (1.5.0)
rake (0.9.2.2)
rdoc (3.9.5)
rmagick (2.13.2)
rspec (2.14.1)
rspec-core (2.14.5)
rspec-expectations (2.14.2)
rspec-mocks (2.14.3)
ruby-opencv (0.0.10)
ruby-vips (0.3.6)
simple_oauth (0.2.0)
sinatra (1.4.3)
slop (3.4.6)
tapp (1.4.0)
thor (0.18.1)
thread_safe (0.1.2)
tilt (1.4.1)
twitter (4.8.1)
tzinfo (0.3.37)
zipruby (0.3.6)

依存してるgemも入ってるし、大丈夫みたいです。

*1:趣味の品を含めてますが、大杉ですw