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
Ruby Block to String Instead of Executing
How to Create a Nokogiri Case Insensitive Xpath Selector
How to Read a File from Bottom to Top in Ruby
Xpath Expression for Regex-Like Matching
Trying to Install Ruby-Filemagic on Snow Leopard Using Brew Rather Than Ports
Sort a Collection of Objects by Number (Highest First) Then by Letter (Alphabetical)
How to Check If a Ruby Array Includes One of Several Values
Putting the Results of Pp (Or Anything Outputted to Console) into a String
Use of Caret Symbol (^) in Ruby
Missing Host to Link To! Please Provide the :Host Parameter, for Rails 4
Rails Date Format in Form Field
Ruby Forgets Local Variables During a While Loop
How to Change Column Type in Heroku
How to Find Out Who Is Connected to Actioncable
Undefined Method with "_Path" While Using Rails Form_For
How to Display the Current Date in "Mm/Dd/Yyyy" Format in Rails