Reputation: 10551
I've just installed the Spree ecommerce CMS without too much of a headache. I literally have no idea what this message means though. Could someone please explain this to me slowly?
Nokogiri appears to some sort of renderer? Please explain this to me, I thought the rails server handled all of the getting and rendering of assets?
LibXML is an XML C parser. Could someone explain what an XML C parser is?
And does 'built against' mean?
I'm pretty established with ruby, but I'm new to deployment. This admin side of things is completely alien! Thanks for helping me out!
Upvotes: 0
Views: 611
Reputation: 62668
Nokogiri is an XML parsing library, and is effectively a clever wrapper around LibXML, which is a library for parsing XML which is written in C. Nokogiri includes C extensions to interface its Ruby code to LibXML. When you install the gem, it'll compile against the libxml headers available on the system, but at runtime it'll dynamically link against the libxml shared object available on the system. You get this warning when those versions don't match - for example, if you upgrade libxml2 on your system after you install Nokogiri.
The way you fix this is to specify which version of LibXML Nokogiri should build against. You can set this up in ~/.bundle/config
, like:
---
BUNDLE_BUILD__NOKOGIRI: --with-xml2-lib=/opt/libxml/lib--with-xml2-include=/opt/libxml/include/libxml2 --with-xslt-lib=/opt/libxml/lib --with-xslt-include=/opt/libxml/include
This basically just sets compile flags to be passed when building Nokogiri's extensions, which lets you specify the location of the LibXML installation to use. Uninstall Nokogiri and let Bundler reinstall it after putting that config (and the right libxml2 version) in place, and all will work as expected.
Upvotes: 7