I've been working on upgrading a personal project from Rails 2.2.2 to 2.3RC1. Things were working swell in development, but when I tried to push it up to production, there were strange errors. Finally got it working, and here's what I figured out...

All the errors I got were eventually linked back to Capistrano and how it fires up processes in production. The first error that you may see occurs if you have more than one version of the Rails gem installed on the server. It'll look something like rake aborted! can't activate rails(= 2.2.2), already activated rails-2.3]. To get around this I uninstalled everything but rails 2.3 on the server, but you shouldn't have to. Doing so just helped me get to the root of what the real problem was (keep reading).

The next error I got was no such file to load -- commands/process/reaper. Searching for this error I finally fell upon this Capistrano ticket which says that we need to install the irs_process_scripts plugin. This is a new plugin providing some deprecated code that Capistrano still needs to function properly. However if you're using Subversion on this project do not install that plugin yet!!!!. Keep reading.

As of this writing, the irs_process_scripts plugin will (immediately upon install) delete your script/process/ directory and re-create it with some new scripts in it. This means that if you're using Subversion, the .svn subdirectory in script/process/ gets deleted, which Subversion doesn't appreciate one iota. If you happened to already do this, your best bet is to check out a new copy of your project and copy the .svn directory from it's script/process back into your working copy.

To resolve this, I forked the irs_process_scripts plugin and made some changes so that it didn't delete the script/process directory and just overwrote the individual files in it that needed to change. I also opened a lighthouse ticket describing the problem. If by the time you read this my fix has been pulled into the official irs_process_scripts plugin, then you should use the official plugin. If not, and you're using Subversion in your project, then definitely use my fork *and* go comment on the lighthouse ticket with a "+1".

Comments: [add comment]