Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Not able to install some gems after mountain lion upgrade

I just updated my Macbook to Mountain Lion, but now I'm not able to install some gems, because of the below error about headers. I looked around and it seems to have to do with Ruby headers missing. It was suggested to install Xcode, so I installed the full Xcode from the app store and also the Xcode command line tools. But still no luck. Any suggestions?

ERROR: Failed to build gem native extension. (Gem::Installer::ExtensionBuildError)
checking for ffi.h... *** extconf.rb failed ***
Could not create Makefile due to some reason, probably lack of
necessary libraries and/or headers.  Check the mkmf.log file for more
details.  You may need configuration options.
like image 414
John Avatar asked Jul 27 '12 06:07

John


1 Answers

Be sure to install Xcode's Command-Line Tools.

This hint helped me with this issue:

sudo ln -s /usr/bin/llvm-gcc-4.2 /usr/bin/gcc-4.2
like image 152
Koraktor Avatar answered Oct 22 '22 09:10

Koraktor