OSX Mountain Lionrvmでruby 2.0.0(rvm使用)をインストールするときに詰まったときのメモ
ruby 2.0.0 & rails4で本格的にやってみようとおもって導入しようとしたときに詰まったのでメモを残す。
まず、あまりrvmを更新してなかったので
rvm install 2.0.0
で普通にインストールしたあと
rvm use 2.0.0
をして切り替えた後、railsでdeviseを使ったアプリを作ろうとすると・・・
/Users/moosan/.rvm/gems/ruby-2.0.0-p0@global/gems/activesupport-3.2.11/lib/active_support/dependencies.rb:251:in `require': cannot load such file -- openssl (LoadError)
何かOpenSSLのところでエラーが、rvmのサイト(https://rvm.io/packages/openssl)にいってみると、解決方法が書かれているのでそれに従って
rvm get head
rvm pkg remove
を実行。次に
rvm requirements run
を実行すると。
Installing requirements for osx, might require sudo password. Skipping `brew update` make sure your formulas are up to date. RVM autolibs is now configured with mode '2' => 'check and stop if missing', please run `rvm autolibs enable` to let RVM do its job or run and read `rvm autolibs [help]` or visit https://rvm.io/rvm/autolibs for more information. Missing required packages: autoconf, automake, libyaml, readline, libxml2, libxslt, libksba, openssl, sqlite. RVM autolibs is now configured with mode '2' => 'check and stop if missing', please run `rvm autolibs enable` to let RVM do its job or run and read `rvm autolibs [help]` or visit https://rvm.io/rvm/autolibs for more information. There were package installation errors, make sure to read the log. Check Homebrew requirements https://github.com/mxcl/homebrew/wiki/Installation
と出たので
rvm autolibs enable
を実行して
rvm reinstall 2.0.0
を実行。
(ここで自分はXcodeをアップデートしろと出て一手間かかった。)
これでOpenSSLの問題が解決されたruby2.0.0がrvmを使ってインストール出来ました;)