Add the Latest Version of Rails When Deploying

August 21, 2005

I'm working on transitioning our Rails deployment process (which consists of some shell scripts on the server) to SwitchTower. ST is so good, it inspires folks to write poetry. But, I have a growing stack of patches that I need applied to the latest version of Rails.

I think the easiest way to do this is with a rake task: Type rake rails_export (add a VERSION=2000 to use revision 2000, for example), and it sets up an export of Rails with your patches applied. The patches and Rails version the application needs are stored with the code, so I should be able to check out any version and rebuild the Rails environment that it expects. I just add a small task to my SwitchTower recipe and I'm all set.