Tuesday, February 1, 2011

Centos 4: install Ruby, gem & mechanize

what's out there 'in the field' is rarely the latest & greatest version of anything. Given the necessarily arcane ways that software is packaged for varieties of linux (wtf is irb a separate package?) - having 'the latest' version of your OS distro usually only means that you can actually get packages for it:

anyway -  you want to install Ruby & gem on an older centos box.

1. Use the instructions here to get ruby & gem. These are GOOD instructions - as they seem to work across several Centos versions.

2. update gem: 'gem update --system'

you want to install the 'mechanize' gem for some web-scraping, first install libxslt using yum - this should pull in all the dependencies like libxml2 etc.

There's a set of discussions about installing mechanize on ubuntu here.

No comments: