Failed to build gem native extension Failed to build gem native extension ruby ruby

Failed to build gem native extension


The problem is that in Lion Xcode 4.3 doesn't by default install (or even include) the command-line tools such as gcc - and those are what are needed here. In the Downloads pane of Xcode's prefs, under Components, ask for the command-line tools. (See the readme: https://developer.apple.com/library/content/documentation/DeveloperTools/Conceptual/WhatsNewXcode/Chapters/xcode_4_0.html#//apple_ref/doc/uid/TP40016147-SW35)

Actually I believe you didn't need to install Xcode at all, since in fact the command-line tool can now be downloaded and installed separately.


I already had Command-line tools installed (xCode as well)... and still had this (initial) error.

The problem was that xCode and the command line tools are no longer installing the gcc compiler. I don't know when they stopped shipping it, but I run mountain lion, and it's not here.So what eventually solved my problem was installing gcc from scratch (https://github.com/kennethreitz/osx-gcc-installer).

Keep Smiling :)


If someone has the same problem for Ubuntu Linux, the solution was:

sudo apt-get install build-essentialsudo apt-get install libsqlite3-dev