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
Failure to install nokogiri libiconv is missing on Yosemite Mac OS X 10.10
The nokogiri install tutorial provides the solution:
# bash
brew unlink gcc
gem uninstall nokogiri
xcode-select --install
gem install nokogiri
If you don't have Xcode 6.1, yet, you may install it from the apple developer download site (section additional tools), as described in this blog post.
Error installing Nokogiri gem on Mac OS X
If you are using brew use this in the terminal:
brew unlink gcc-4.2 # you might not need this step
gem uninstall nokogiri
xcode-select --install
gem install nokogiri
If this didn't work please check "Installing Nokogiri on OSX 10.10 Yosemite"
Related Topics
Rails 3.1 Pipeline - Exclude JavaScript File
Sum the Value of Array in Hash
How to Use Bundler with Offline .Gem File
How to Alter the Timezone of a Datetime in Ruby
Get Index of String Scan Results in Ruby
Ruby 1.9 Hash with a Dash in a Key
Get Single Char from Console Immediately
Why Do I Get Uninitialized Constant Devise Name Error When Running Webrick Server
Running into Smtp Error When Trying to Send Email in Ror App
Differencebetween Link_To, Redirect_To, and Render
Asynchronous Http Request in Ruby
Relationship Like Twitter Followers/Followed in Activerecord