o5ewia
4.233K
· March 2013 ·
Michele wedding square

Get rid of Nokogiri LibXML warning on OSX Lion

If you are a Rails developer on OSX Lion or Mountain Lion, you might have seen this:

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

This happens because the Lion system default libxml2 (loaded at bootstrap) is used, regardless of which libxml2 Nokogiri was built against.

To get rid of the warning, (re)install the Nokogiri gem with:

gem install nokogiri -- --with-xml2-dir=/usr --with-xslt-dir=/opt/local --with-iconv-dir=/opt/local
Sign in or sign up to add your response.

1 Response

7516
Michele wedding square

Also, try moving gem 'nokogiri' in the Gemfile to the top (just below gem 'rails'), as per https://github.com/sparklemotion/nokogiri/issues/742#issuecomment-9082139

over 1 year ago ·
Featured Programming Job

Senior Software Developer
·
The Hague, the Netherlands.
·
Full Time
Search all programming jobs