I\'m trying to install libxml-ruby.
I have installed libxml2, libxslt and coreutils
I have also read other posts rega
macOS comes with libmxl2 installed, always, there is no need to use a utility like brew to install it first. Yet the headers are not found in /usr/include/libxml but in /usr/include/libxml2/libxml.
The configure script of the libxml-ruby gem tries to detect if libxml is installed by compiling code that looks like this:
#include
But when compiling with the compiler shipped with Xcode, only this code would work:
#include
The trick is to let the configure script know where to find the headers. On a macOS system with Xcode installed, the following will work:
gem install libxml-ruby -v '3.1.0' -- --with-xml2-include=`xcrun --show-sdk-path`/usr/include/libxml2