Last Updated: February 25, 2016
·
2.77K
· lordkeper

Install gem libxml-ruby on OSX Mavericks 10.9.x

Libxml-ruby aren't compatible with libxml2 2.9.x until version 2.4.0.

To keep developing legacy proyects, you must install older version of libxml2 with homebrew.

First check versions availables:

brew versions libxml2

Right now, the older version compatible is 2.7.6 so:

cd /usr/local/
git checkout 8939a91 Library/Formula/libxml2.rb
brew install libxml2
ln -s /usr/local/opt/libxml2/bin/xml2-config /usr/local/bin/xml2-config

Now you can bundle install or gem install older versions of libxml-ruby

1 Response
Add your response

brew versions doesn't work any more, but the second part still does, thanks :)

And actually, instead of manually creating the symlink in the last step, you can brew link libxml2 --force

over 1 year ago ·