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
.
Written by Gabe Berke-Williams
Related protips
4 Responses
this is great :)
over 1 year ago
·
Thank you Gabe
over 1 year ago
·
Great!
over 1 year ago
·
I've put together a ruby script as a gist which does something similar.
over 1 year ago
·
Have a fresh tip? Share with Coderwall community!
Post
Post a tip
Best
#Ruby
Authors
Sponsored by #native_company# — Learn More
#native_title#
#native_desc#