Just the other day, I installed Snow Leopard and now, re-installing my development environment I came across this when trying to install Nokogiri.
Building native extensions. This could take a while...
ERROR: Error installing nokogiri:
ERROR: Failed to build gem native extension.
/Users/jmacdonald/.rvm/rubies/ruby-1.8.7-p174/bin/ruby extconf.rb
checking for libxml/parser.h... yes
checking for libxslt/xslt.h... yes
checking for libexslt/exslt.h... yes
checking for iconv_open() in iconv.h... no
checking for iconv_open() in -liconv... no
-----
libiconv is missing. please visit
http://nokogiri.org/tutorials/installing_nokogiri.html for help with
installing dependencies.
...
I spent a bunch of time trying different options on with the ‘gem install’ and then actually decided to follow the instructions on the Nokogiri site.
Even though it looks like an iconv problem (and maybe it is) running the following updates not only libxml2 and libxslt but iconv as well:
sudo port install libxml2 libxslt
gem install nokogiri # in my case I was using RVM
Sure enough, the install worked.