running to stand still

I spent a busy evening working on updates and fixes to Giggle, with the end result of several hours hacking being… no apparent change as far as the user is concerned. Sigh.

The motivation for this seemingly pointless exercise was when I started trying to run the development version of the system locally and it wouldn’t. There have been some significant changes in libraries which meant it was broken against a ‘current’ Ruby installation. In particular removal of the require_gem method from RubyGems seems to have hit a lot of existing library code.

(It is interesting that the authors of RubyGems and Rails have been happy to remove deprecated methods after a period of a year or so. In the Java world there are methods which have been marked deprecated for ten years or more and are still in the libraries.)

The main problem for Giggle was its use of the Ruby OpenID library. In order to get a version which dealt with the Gem change, I had to upgrade to 2.0.x, which had some API changes compared to the 1.1.x I was using. This meant that the plugin I was using wouldn’t work. I looked around for alternatives, but didn’t see anything I could just drop in. In the end I started with DHH’s Open ID Authentication plugin and fixed it to work with the 2.0.x API, since I didn’t want to change my existing models or the external interface of the controllers.

Since I was doing heavy updates, I also went for Rails 2.0.x, which required a few minor fixes but nothing too significant.

The application is now using several plugins, and I had to learn about config.plugins to be able to get them to load in the right order. Gems On Rails has to load first since it is including OpenID libraries into the load path, and some of the other plugins are depending on those. Then I have my patched up Open ID Authentication, Active Record OpenID Store (from the OpenID library), the handy Annotate Models, Acts As List (previously in Rails core, but removed for version 2.x). Finally Dreamhost, which helps the application run a bit more smoothly on Dreamhost.

Next time I have a spare evening perhaps I can move on to actual bug fixes and enchancements. Wow.

One Trackback

  1. By The Junction » giggle patching on May 22, 2008 at 8:58 am

    […] when I tried to add the latest gig I went to and found it wouldn’t work. It seems my last set of updates caused a couple of problems that I hadn’t […]

Post a Comment

Your email is never published nor shared. Required fields are marked *