kia38w
Last Updated: February 25, 2016
·
1.352K
· mathias
311c342bfd324eb9d3603222f7f36f24

WARNING: Nokogiri was built against LibXML version x.x.x, but has dynamically loaded y.y.y

When you run tests or rake, if you see:

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

Then do the following:

 gem uninstall nokogiri libxml-ruby

brew update

brew uninstall libxml2
brew install libxml2 --with-xml2-config

brew uninstall libxslt
brew install libxslt
brew unlink libxslt

bundle config build.nokogiri -- --with-xml2-dir=/usr --with-xslt-dir=/usr --with-iconv-dir=/usr
bundle

Nokogiri should now be compiled against the right version!