Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save srpouyet/5099473 to your computer and use it in GitHub Desktop.
Save srpouyet/5099473 to your computer and use it in GitHub Desktop.
Get rid of those pesky "WARNING: Nokogiri was built against LibXML version X, but has dynamically loaded Z" warnings on Mac OS X (Mountain) Lion.

How to get rid of those pesky
WARNING: Nokogiri was built against LibXML version X, but has dynamically loaded Z
warnings on Mac OS X (Mountain) Lion:

  1. gem uninstall nokogiri libxml-ruby
    Continue to step 5 if you already recently brewed libxml2 and libxslt...
  2. brew update
  3. brew install libxml2 --with-xml2-config
  4. brew install libxslt
  5. gem install nokogiri -- --with-xml2-include=/usr/local/opt/libxml2/include --with-xml2-lib=/usr/local/opt/libxml2/lib --with-xslt-dir=/usr/local/opt/libxslt

Forked and adapted from: https://gist.github.com/devpuppy/1349681

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment