Reputation: 8918
I intalled mavericks this morning on my mac, but it seems it has done something with ruby gems... When i type:
sudo gem install cocoapods
It breaks with error:
ERROR: Error installing cocoapods:
ERROR: Failed to build gem native extension.
/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/bin/ruby extconf.rb
mkmf.rb can't find header files for ruby at /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/include/ruby.h
I browsed net and found this, some people say that it helps, but before doing it can anyone elaborate some more on this:
sys_rb_usr=/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr
sdk_rb_usr=`xcode-select -p`/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr
sudo cp -r $sdk_rb_usr/include $sys_rb_usr/include
Will copying this solve a problem, and if it doesn't am I in danger of losing something?
Upvotes: 2
Views: 4836
Reputation: 3780
As an update since this question is a few months old:
I have XCode 5.0.2 installed on OS X Mavericks and ran into the exact same issue. The issue may have been fixed with XCode 5.0.1, but something broke again...
I'd downloaded/installed XCode command line tools for Mavericks w/o success. Next tried the solution above w/no success.
What finally worked for me was sym link gcc to gcc-4.2 as explained here: command line tools for new 10.9 OSX for ruby gems?
sudo ln -s /usr/bin/gcc /usr/bin/gcc-4.2
After that, cocoapods finally installed properly.
Upvotes: 9
Reputation: 63984
Looks like this may have been fixed with Xcode 5.0.1 from the MAS. https://gist.github.com/goshakkk/5763489#comment-931445
Upvotes: 1