I want to run
bundle exec rake fixtures:populate_from_db
on CentOS but I get the following warning messages:
WARNING: Nokogiri was built against LibXML version 2.9.1, but has dynamically loaded 2.8.0
rake aborted!
~/.bundle/config
file contains:
BUNDLE_BUILD__NOKOGIRI: "--with-xml2-include=/opt/local/include/libxml2 --with-xml2-lib=/opt/local/lib --with-xslt-dir=/opt/local"
How should I compile Nokogiri again 2.8.0 version of LibXML?
Try running:
gem update --system
& gem pristine nokogiri
Just worked for me.
The following steps solve my problem
gem uninstall nokogiri # remove nokogiri
NOKOGIRI_USE_SYSTEM_LIBRARIES=1 bundle install
Combine the solutions from https://simonharrer.wordpress.com/2013/05/01/fixing-nokogiri-warning-after-ubuntu-upgrade/ and https://github.com/sparklemotion/nokogiri/wiki/What-to-do-if-libxml2-is-being-a-jerk
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With