Nokogiri - Error: Failed to Build Gem Native Extension

Nokogiri 'Failed to build gem native extension' when I run bundle install

Previous advises didn't help me, here is the solution for OS 10.9:

brew install libxml2
bundle config build.nokogiri "--use-system-libraries --with-xml2-include=/usr/local/opt/libxml2/include/libxml2"
bundle install

nokogiri will not install - ERROR: Failed to build gem native extension

You should have the necessary required packages:

Ruby

sudo apt-get install ruby1.8-dev ruby1.8 ri1.8 rdoc1.8 irb1.8
sudo apt-get install libreadline-ruby1.8 libruby1.8 libopenssl-ruby

nokogiri

sudo apt-get install libxslt-dev libxml2-dev zlib1g-dev
sudo gem install nokogiri

This should fix this. Or alternatively see Problems installing Nokogiri (1.5.2) on Ubuntu 12.10 Which should also be able to answer your question. Pointer for future reference. Try to research on stackoverflow or other resources that may have the answer because you may find that your problem has already been solved
Wi

nokogiri - ERROR: Failed to build gem native extension

Thanks all - As i updated to Lion, I needed to install x code 4.1 to get the correct files behind the scenes for the bundler to install all of the correct bundles. All working sweet now!



Related Topics



Leave a reply



Submit