When installing nokogiri 1.6.1 on my RubyStack installation with Mac OS X Mavericks I got the following error.
Gem::Installer::ExtensionBuildError: ERROR: Failed to build gem native extension.
Running ‘configure’ for libxml2 2.8.0… ERROR, review ‘tmp//ports/libxml2/2.8.0/configure.log’ to see what happened.
The configure.log said that the gcc/make could not be found. While figuring it out I found a lot of issues, and the information for fixing them was all deprecated.
The following steps solved my issues completely:
# sudo xcode-select -switch /Library/Developer/CommandLineTools # gem uninstall nokogiri libxml-ruby # gem update --system # gem install nokogiri
Gem update is unnecessary, but good to have just in case. Hope this helps.