efp3xg
Last Updated: February 25, 2016
·
5.081K
· gabebw
1a3fec33b61038721fd4e609c1d1a4b7

Fix those Nokogiri libxml version mismatch errors

I see these errors a lot:

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

Here's how to fix them:

# Mercilessly nuke every Nokogiri version
$ gem uninstall nokogiri --all --force --executables 
# These arguments will be passed to `gem install nokogiri`
$ bundle config build.nokogiri -- --with-xml2-include=`brew --prefix libxml2`/include/libxml2 --with-xml2-lib=`brew --prefix libxml2`/lib --with-xslt-dir=`brew --prefix libxslt`
# Reinstall
$ bundle install

You'll need to do this every time you install a new version of libxml.

Say Thanks
Respond

4 Responses
Add your response

12303
06237052745686cba3fcb34d056d3cad

this is great :)

over 1 year ago ·
12645
0aaab82ef5fd2c03a269eea4277deec5

Thank you Gabe

over 1 year ago ·
12696
Ae392b1c95fac6ccf1d8397649ff29c6

Great!

over 1 year ago ·
16218
985d2865248f78c1b32ab6f26e38969b

I've put together a ruby script as a gist which does something similar.

over 1 year ago ·