I recently did a clean install of Mountain Lion, and after installing Nokogiri - got an error when starting up the Rails console:
WARNING: Nokogiri was built against LibXML version 2.8.0, but has dynamically loaded 2.7.8
So I looked at other questions here on SO, and uninstalled everything and tried again, but I noticed the install instructions are out of date on the Nokogiri website: http://nokogiri.org/tutorials/installing_nokogiri.html
Because 'brew install libxml2 libxslt', actually installs libxml2 2.8.0, and reading further down the instructions it refers to 2.7.8:
gem install nokogiri -- --with-xml2-include=/usr/local/Cellar/libxml2/2.7.8/include/libxml2
--with-xml2-lib=/usr/local/Cellar/libxml2/2.7.8/lib
--with-xslt-dir=/usr/local/Cellar/libxslt/1.1.26
--with-iconv-include=/usr/local/Cellar/libiconv/1.13.1/include
--with-iconv-lib=/usr/local/Cellar/libiconv/1.13.1/lib
(notice libxml2/2.7.8)
So I uninstall again, and reinstall with: (libxml2/2.8.0)
sudo gem install nokogiri -- --with-xml2-include=/usr/local/Cellar/libxml2/2.8.0/include/libxml2 --with-xml2-lib=/usr/local/Cellar/libxml2/2.8.0/lib --with-xslt-dir=/usr/local/Cellar/libxslt/1.1.26 --with-iconv-include=/usr/local/Cellar/libiconv/1.13.1/include --with-iconv-lib=/usr/local/Cellar/libiconv/1.13.1/lib
And while it seems to work fine in IRB, it doesn't in Rails C - it still says:
WARNING: Nokogiri was built against LibXML version 2.8.0, but has dynamically loaded 2.7.8
I've tried running bundle update, but it's still the same.
Any ideas how I can fix this please?