I'm trying to run a Ruby script, so I installed Ruby together with Ruby gems on my Mac OS X 10.7 system. The script requires the Rubygem "mechanize" so I tried to install it by using:
sudo gem install mechanize
However this fails with an error:
Error installing mechanize: ERROR: Failed to build gem native extension.
/usr/local/bin/ruby extconf.rb checking for libxml/parser.h... no ----- libxml2 is missing. please visit http://nokogiri.org/tutorials/installing_nokogiri.html for help with installing dependencies.
So it seems libxml2 is missing or not found. What is the easiest way to install it? It's already in
/usr/lib/libxml18.104.22.168.dylib /usr/lib/libxml2.dylib /usr/lib/libxml2.2.dylib
I have to add that I don't know anything about Ruby programming, I just want to run a little script I found at github.