zaxkow
Last Updated: February 25, 2016
·
633
· devatotech

Nokogiri Install Error - libiconv is missing

Started getting this error everytime we installed a new Ruby version:
An error occurred while installing nokogiri (1.6.2.1), and Bundler cannot continue.
Make sure that gem install nokogiri -v '1.6.2.1' succeeds before bundling.

After scrolling up you see that liviconv is missing.

Try these steps to correct:
brew update

Then install a newer version of libiconv:
brew install libiconv

Then link your new iconv libs:
brew link libiconv

After running the above command, tank note of where libiconv is stored
Warning: Already linked: /usr/local/Cellar/libiconv/1.14

Then install your gem:
gem install nokogiri -- --with-iconv-dir=/usr/local/Cellar/libiconv/1.14

Filed Under