Skip to content

Instantly share code, notes, and snippets.

@tancnle
Created June 22, 2012 01:32
Show Gist options
  • Save tancnle/2969692 to your computer and use it in GitHub Desktop.
Save tancnle/2969692 to your computer and use it in GitHub Desktop.
Fix incorrect Nokogiri loaded libraries

Every time I upgrade libxml2 via Homebrew, running cucumber test will post an annoying warning message

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

To fix it:

$ gem uninstall nokogiri
$ brew link libxml2
$ 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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment