Smokes your problems, coughs fresh air.

RubyGems nuisances

Because I used it successfully before, I decided to use scrAPI to scrape the entries from the old Aihato guestbook. After preprocessing the HTML a bit, I finally got beyond an endless debugging sessions (which cumulated in me discovering a whole collection of nested <html> tags, which forbad any type of sensible parsing of the page).

The scrAPI script calls a simple PHP script to add the extracted comment to the WordPress DB. The next step was copying the script to the development server (which has command-line PHP and the MySQL daemon running). Of course, the development server (which runs Debian Lenny) didn’t have the scrapi package installed. So, I thought I’d install the rubygems package and be done after gem install scrapi.

It seemed to install just fine, but… it just won’t fucking work! Adding require 'rubygems' to the script doesn’t work either.

This whole thing reminded of a similar occasion a while back when RubyGems kept fucking up everything until we discovered through Google that the version of RubyGems shipped with Debian simply couldn’t handle the whole dependency graph we had to deal with (or something). We had to grab a newer version from Debian backports to make the whole thing work. Another couple of hours wasted on a botched up package management system.

This time I’ve already wasted enough time. I’m ready to change my PHP guestbook comment import code to some XML-RPC hack instead so that I can run it on my laptop.

1 Comment

  1. Rowan Rodrik

    I noticed that on the Debian Lenny machine, everything under the /var/lib/gems/1.8/ directory (created by the package rubygems-1.2.0-3) was only readable/executable by root. chmod go+Xr fixed the errors from not being able to find scrapi, but the installed scrapi version started complaining about being unable to load libtidy.dylib (which it’s looking for in its own lib/tidy directory).

    Sod it. I’m running back to my laptop.

© 2024 BigSmoke

Theme by Anders NorenUp ↑