Install nokogiri and libxml2 on Snow Leopard

This gets me everytime.
You have installed libxml2 through MacPorts but Nokogiri won’t compile, even with complex command line arguments.

Solution:

sudo port upgrade --enforce-variants libxml2 +universal
sudo port upgrade --enforce-variants libxslt +universal
gem install nokogiri -- --with-xml2-include=/opt/local/include/libxml2 --with-xml2-lib=/opt/local/lib --with-xslt-dir=/opt/local

Now I can install capybara or webrat:

gem install capybara
$1.99 domains with SSL purchase!

Leave a Reply

Your email address will not be published. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong> <pre lang="" line="" escaped="" highlight="">