
I recently set up a new Rails deployment server based on Ubuntu 10.04, Nginx, Unicorn and rbenv. A few of my Rails applications is still running on Ruby 1.8.7 so the web server must handle multiple ruby versions.
The idea is that each and every Rails application should be self contained.
Meaning that running unicorn uses the Ruby in .rbenv-version and the Unicorn in Gemfile.lock.
By telling Capistrano to generate binstubs we know that the gems installed within the application will be used.
Bundler should be the only gem installed to the global gemset.