Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

WARNING: Nokogiri was built against LibXML version 2.7.3, but has dynamically loaded 2.7.8

After making a fresh install of Mac OS X 10.8 Mountain Lion, and after installing Ruby 1.9.3 and Ruby on Rails 3.2.6, I started the Rails console and I got this warning message:

WARNING: Nokogiri was built against LibXML version 2.7.3, but has dynamically loaded 2.7.8

How can I fix it?

like image 539
David Morales Avatar asked Jul 12 '12 12:07

David Morales


2 Answers

I reinstalled Ruby, that fixed it. Was able to use the built-in libraries.

like image 183
kyubey Avatar answered Nov 04 '22 03:11

kyubey


I have found some fixes for Lion, but none for Mountain Lion yet. Nonetheless I have tried this and it works:

gem uninstall nokogiri libxml-ruby

brew update
brew uninstall libxml2
brew install libxml2 --with-xml2-config
brew link libxml2

brew install libxslt
brew link libxslt

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/

Source (for Lion): https://gist.github.com/1349681

like image 13
David Morales Avatar answered Nov 04 '22 01:11

David Morales