I decided to run a bundle update on one of my core projects today and lo and behold, I received the following error:
Gem::Ext::BuildError: ERROR: Failed to build gem native extension. /Users/kelvin/.rbenv/versions/2.2.0/bin/ruby -r ./siteconf20150415-9556-1l623l4.rb extconf.rb checking for main() in -lpthread... yes checking for main() in -lobjc... yes creating Makefile make "DESTDIR=" clean make "DESTDIR=" compiling accessor.cc clang: warning: argument unused during compilation: '-rdynamic' In file included from accessor.cc:1: In file included from ./rr.h:6: In file included from /Library/Developer/CommandLineTools/usr/bin/../include/c++/v1/vector:265: In file included from /Library/Developer/CommandLineTools/usr/bin/../include/c++/v1/__bit_reference:15: In file included from /Library/Developer/CommandLineTools/usr/bin/../include/c++/v1/algorithm:628: In file included from /Library/Developer/CommandLineTools/usr/bin/../include/c++/v1/memory:604: /Library/Developer/CommandLineTools/usr/bin/../include/c++/v1/iterator:341:10: fatal error: '__debug' file not found #include <__debug> ^ 1 error generated. make: *** [accessor.o] Error 1 make failed, exit code 2 Gem files will remain installed in /Users/kelvin/.rbenv/versions/2.2.0/lib/ruby/gems/2.2.0/gems/therubyracer-0.12.2 for inspection. Results logged to /Users/kelvin/.rbenv/versions/2.2.0/lib/ruby/gems/2.2.0/extensions/x86_64-darwin-14/2.2.0-static/therubyracer-0.12.2/gem_make.out An error occurred while installing therubyracer (0.12.2), and Bundler cannot continue. Make sure that `gem install therubyracer -v '0.12.2'` succeeds before bundling.
It turns out that there is an issue with the command line tools in Xcode 6.3. So you have to revert back to Xcode 6.2. For a full reference, here’s the link from StackOverflow where I got my information from.
Unfortunately, there’s not an easy way to directly link to the download but here’s the link to the general Developer Downloads from Apple