This could be considered a fresh installation, speaking in ruby terms. I just had ruby installed, no ruby gems, nor ruby dev nor anything else ruby. So this should be enough for installing hpricot as well as ruby gems (which are required for installing hpricot).
As you can see, I didn't download any source file, instead I was happy with using apt-get and the hpricot version from ubuntu repositories, although they are relatively old (for example rubygems is more than a year old). If I find any problem and need to update to newer versions I'll report that here ;-)
sudo apt-get install rubygems sudo rm /var/lib/gems/1.8/source_cache sudo gem update sudo apt-get install ruby1.8-dev sudo gem install hpricot
It's a pity they don't have a metapackage for ruby's development files (the ruby1.8-dev package), the same way there's a ruby metapackage which depends on the ruby1.8 package, so whenever ruby is updated it will update the ruby version as well, without the user having to worry about the version number.
Even more, I instinctively tried a naive sudo apt-get install rubydev and was greeted with a sad "Couldn't find package rubydev". It somehow proves that a metapackage called rubydev would be quite useful... at least for instinctive users.
Enjoy your screen scrapping!