(347) 284 6256 My status
by:  Marcelo de Moraes Serpa       at:  December 3rd, 2009
I remember when I used to develop for the web with Python. At that time, I was involved with CMS/Portal development, and hence, we were using Plone 3/Zope 3 as a CMS platform.
Plone 3/Python deployment essentially depends on one tool, called buildout. The Python community pioneered in this sense, creating a tool to totally automate the deployment, from fetching and installing eggs and dependencies to compiling software, setting ENV vars, and even starting the server. Buildout is also not limited to the web, it was and is used for any flavor of application built with Python and its eco-system.
Basically, Buildout solves the dependency and deployment issues for Python.
So, any developer who is switching from Python to Ruby may be wondering what equivalent tools exist. Ruby has had Capistrano for some time already, but Capistrano is a different beast. It won’t solve the initial issues of deployment. The most significant difference is that it won’t install the gems. You have to setup the environment all by yourself, which is not fun.
The missing piece, as said, is the gem download and dependency resolution, which buildout does very well, but Capistrano does not have any clue about.
For Ruby, we have rake gems:install, but it can bring up some issues, like installing a gem that has been already installed globally. Or maybe you just want to install the gems globally, instead of locally for the application in question.
To make our lives easier and have more time to play with the cool stuff, now we can automate the “set up the environment and installing gems” part of the deployment process.
Gem Bundle makes things very simple. If you don’t have a complex server infrastructure, you don’t even need Capistrano and can just deploy an application with gem bundle like this:
[rails app]$ gem bundle
[rails app]$ git clone
Then, import the schema and start the server, of course. The most boring part, which is installing and resolving gem dependencies is solved though.
And if you are currently using Capistrano, it is possible also tointegrate Gem Bundle into the Workflow.
So, from now on, whenever you think about Ruby/Rails application deployment, remember Gem Bundle. Give it a try and simplify yourlife!