Error while installing Nokogiri (1.6.7) on El Capitan
You should install xcode-select
packages first, then try installing nokogiri again. Try these commands,
xcode-select --install
then try
gem install nokogiri
with whatever Nokogiri version you want.
Nokogiri depends on multiple libraries like libxslt, libxml and zlib. Dev versions (including source) of these should be installed before installing Nokogiri in any Linux distribution. For OS X, the above command should work I guess.
The actual solution is in the comments below.
Bundle install error installing nokogiri (1.6.7.2). Gem installs but not for rails app
I fixed it, but it may be an unsatisfying answer. I went through all of the advice, installed various dependencies, changed various settings. Nothing seemed to work. Then I deleted the project folder and pulled it again from Github, reinstalled rvm, ran bundle install
again and it all worked normally.
So what was the one thing that I was missing? I can't be sure. But I can say if nothing else works, create a new folder and download the project again and run bundle install
.. after installing all dependencies / tools first of course, found here -> https://nokogiri.org/tutorials/installing_nokogiri.html
Failing to install Nokogiri gem
This works like a charm!
gem install nokogiri -- --use-system-libraries=true --with-xml2-include=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk/usr/include/libxml2
https://stackoverflow.com/a/24511149
Why does installing Nokogiri on Mac OS fail with libiconv is missing?
I had the same issue. Unfortunately the "Installing Nokogiri" doesn't cover Iconv issues. Here's how I resolved the issue.
First install homebrew, it'll make your life easier. If you already have it installed, be sure to grab the latest formulae by updating like so:
brew update
Note: In OSX 10.9+ you may need to install xCode command tools to allow you to install libiconv.
xcode-select --install
then install a newer version of libiconv
brew install libiconv
then install your gem
gem install nokogiri -- --with-iconv-dir=/usr/local/Cellar/libiconv/1.14
Why does installing Nokogiri on Mac OS fail with libiconv is missing?
I had the same issue. Unfortunately the "Installing Nokogiri" doesn't cover Iconv issues. Here's how I resolved the issue.
First install homebrew, it'll make your life easier. If you already have it installed, be sure to grab the latest formulae by updating like so:
brew update
Note: In OSX 10.9+ you may need to install xCode command tools to allow you to install libiconv.
xcode-select --install
then install a newer version of libiconv
brew install libiconv
then install your gem
gem install nokogiri -- --with-iconv-dir=/usr/local/Cellar/libiconv/1.14
Why does installing Nokogiri on Mac OS fail with libiconv is missing?
I had the same issue. Unfortunately the "Installing Nokogiri" doesn't cover Iconv issues. Here's how I resolved the issue.
First install homebrew, it'll make your life easier. If you already have it installed, be sure to grab the latest formulae by updating like so:
brew update
Note: In OSX 10.9+ you may need to install xCode command tools to allow you to install libiconv.
xcode-select --install
then install a newer version of libiconv
brew install libiconv
then install your gem
gem install nokogiri -- --with-iconv-dir=/usr/local/Cellar/libiconv/1.14
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
Related Topics
Ruby on Rails - "Add 'Gem SQLite3'' to Your Gemfile"
Redefining a Single Ruby Method on a Single Instance with a Lambda
Using Join Tables in Ruby on Rails
How to Uninstall Ruby on Rails on MAC Os X
How to Automate Chrome Request Blocking Using Selenium-Webdriver for Ruby
Rails Route to Username Instead of Id
How to Use Hash Keys as Methods on a Class
How to Count the Number of Records That Have a Unique Value in a Particular Field in Ror
How to Select Every Nth Item in an Array
How to Generate Zip File Without Saving to the Disk with Ruby
Put a Link in a Flash[:Notice]
In Ruby on Rails, After Send_File Method Delete the File from Server
Getting an Ascii Character Code in Ruby Using '' (Question Mark) Fails
Gem.Source_Index Is Deprecated, Use Specification. Should I Re-Install Gem or Rails
In Ruby's Test::Unit::Testcase, How to Override the Initialize Method