Error installing libxml-ruby

If you hit this error when running bundle

An error occurred while installing libxml-ruby (3.1.0), and Bundler cannot continue.
Make sure that `gem install libxml-ruby -v '3.1.0' --source 'https://rubygems.org/'` succeeds before bundling.

Try this command:

bundle config build.libxml-ruby --with-xml2-include=`xcrun --show-sdk-path`/usr/include/libxml2

For more details on that solution, see: