LoginSignup
4
4

More than 5 years have passed since last update.

Mac Yosemite にてRVMでのRubyのコンパイル時クラッシュを解消

Posted at

Yosemiteが原因かはっきりしないですが、RVMでRubyをインストールしようとすると、Macごとクラッシュするようになってしまいました。

$ rvm install ruby-2.1.4
ruby-2.1.4 - #removing src/ruby-2.1.4..
Searching for binary rubies, this might take some time.
No binary rubies available for: osx/10.10/x86_64/ruby-2.1.4.
Continuing with compilation. Please read 'rvm help mount' to get more information on binary rubies.
Checking requirements for osx.
Updating certificates in '/usr/local/etc/openssl/cert.pem'.
Requirements installation successful.
Installing Ruby from source to: /Users/user/.rvm/rubies/ruby-2.1.4, this may take a while depending on your cpu(s)...
ruby-2.1.4 - #downloading ruby-2.1.4, this may take a while depending on your connection...
ruby-2.1.4 - #extracting ruby-2.1.4 to /Users/user/.rvm/src/ruby-2.1.4....
ruby-2.1.4 - #configuring...................................\
  [復元されました]

色々試したんですが、結果だけ言うと、下記のステップのどこかで直りました。
1. brew update brew doctor brew upgrade
2. OS X Command Line Toolsのインストール(XCode 6.1) <= おそらくココが一番重要!
3. .bashrcに一部行追加(rvmを再インストールしたらrvm useがnot workedになったので)

.bashrcに追加した内容

if test -f ~/.rvm/scripts/rvm; then
    [ "$(type -t rvm)" = "function" ] || source ~/.rvm/scripts/rvm
fi

ついでに、Rubyのgem、therubyracerとlibv8(v8)の依存関係問題にもぶつかりました。こちらは下記のような形で対応しました。

$ gem uninstall libv8
$ gem install therubyracer
$ gem install libv8 -v '3.16.14.3' -- --with-system-v8

brew install v8コマンドも実施したんですが、これはたぶん意味が無い(インストールしただけでたぶん使ってない...)と思いますが、一応備忘録として記録。

これできちんとMac OS X YosemiteにアップグレードしたMacでRVMでRubyを正しくインストール出来ると思います。

4
4
0

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