Skip to content

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.


2 Comments ( Add comment / trackback )

  1. (permalink)
    Comment by Rowan Rodrik
    On June 21, 2010 at 17:09

    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.

  2. On Feb 08, 2013 at 23:27

    [...] I never could call the PHP script from the Ruby script because I couldn’t get the necessary gems to install on the development server where the import needed to happen, so I [...]

Post a comment

(required)
(required)

Your email is never published nor shared.

(optional)
Allowed HTML: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>