Upgrade libxml on Mac OS X
Download this package and expand it:
ftp://xmlsoft.org/libxml2/libxml2-2.7.3.tar.gz
Expand the archive and cd into its directory
./configure && make && sudo make install
At this point, you need to recompile nokogiri with the new libxml:
sudo gem install nokogiri——with-xml2-include=/usr/local/include/libxml2—with-xml2-lib=/usr/local/lib—with-xslt-dir=/usr/local