エラー内容
osx10.9.5環境でshenzhenをインストールしようとしたら
# ~ sudo gem install shenzhen
Password:
Building native extensions. This could take a while...
ERROR: Error installing shenzhen:
ERROR: Failed to build gem native extension.
/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/bin/ruby -r ./siteconf20150715-80705-c762g.rb extconf.rb
creating Makefile
make "DESTDIR=" clean
make "DESTDIR="
compiling generator.c
In file included from generator.c:1:
In file included from ./../fbuffer/fbuffer.h:5:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.10.sdk/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/include/ruby-2.0.0/ruby.h:33:
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.10.sdk/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/include/ruby-2.0.0/ruby/ruby.h:24:10: fatal error: 'ruby/config.h' file not found
# include "ruby/config.h"
^
1 error generated.
make: *** [generator.o] Error 1
make failed, exit code 2
エラーが出てインストールに失敗する
対応
http://stackoverflow.com/questions/26434642/yosemite-upgrade-broke-ruby-h
Command Line Toolsをインストールする
該当のバージョンに合わせたものをダウンロードしてインストール。
今回はxcodeのバージョンに合わせてCommand Line Tools (Osx 10.9) for Xcode 6.2を入れた。
Command Line Toolsインストール後、shenzhenのインストールは出来た。