Deploying Ruby on Rails on GlassFish v3 server using Capistrano

Capistrano is a ruby-based remote management tool. The original use was to manage the packs of mongrels that rails required, but they've turned it into a very nice set of tools for general use.

Here is what you would need to do:

Setup

<pre>
gem install capistrano
</pre>

And then follow the setup instructions over at the Capistrano tutorials page. That should end up getting your application almost ready to deploy with Capistrano on GlassFish.

Use GlassFish Capistrano recipes

Open config/deploy.rb and add the GlassFish Capistrano recipes to it.

Other deployment notes

Since GlassFish can handle multiple rails applications at a time, you'll also have to make sure that if you are deploying multiple applications on the same Glassfish instance that you set the name of the "current" directory to something different for each of them (and the context roots, obviously), or there will be name conflicts.