Getting Cerberus and Rails 1.2RC1 to play nice

Now that the book is off to the copyeditor, I finally am finding some time to do a bit of house cleaning. I sat down yesterday to work through nine Rails projects with the following objectives:

  1. Make sure everything is configured correctly for continuous integration builds with Cerberus
  2. Update any code that is causing problems with Rails 1.2 RC1 or with Rails 2.0 deprecation warnings.
The deprecation stuff was surprisingly easy, just a little regular expression work in TextMate. As an aggregate, the nine projects have over 90% test coverage, so I was quickly able to verify that the fixes were correct.

Getting all the projects to build against 1.2RC1 in Cerberus was surprisingly hard. First, Cerberus itself does not work with RC1! I have submitted an ugly workaround for that if you are having the same problem. But the problem with Cerberus is one example of the more general problem: Code loading in Rails is tricky, environment-dependent, and has changed in some way in RC1.

Apparently, some plugins out there depend on eccentricities of code loading. Of my nine projects, six moved to RC1 with no trouble, and the other three cannot run on RC1 at all. What the three projects have in common is that they depend on a lot of plugins. Unfortunately, the errors are somewhat cryptic, and all different.

I see that JDD has had some problems with code loading in Rails, but for the most part I don't see others out there having this kind of pain. Am I just unlucky?

Get In Touch