Ruby Header Files OS-X Lion

If you try to install a ruby gem you are likely to receive the following error:

ERROR: Error installing caldecott:
ERROR: Failed to build gem native extension.

/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/bin/ruby extconf.rb
mkmf.rb can’t find header files for ruby at /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/ruby.h

It clearly mocks about the missing ruby.h file. To overcome this issue you need to have XCode installed and there goto “Preferences/Downloads”

XCode Downloads

Download the “Command Line Tools”. Afterwards the gem installation should succeed with a breeze.

Submit a Comment

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>