This is a sample configuration for deploying Ruby on Rails applications with Capistrano 3.1 including Zero Downtime Deployment with Unicorn and Sidekiq background Workers.
See http://www.talkingquickly.co.uk/2014/01/deploying-rails-apps-to-a-vps-with-capistrano-v3/ for a tutorial on usage.
Or for more details, this is also the example configuration used in the book Reliably Deploying Rails Applications available on Leanpub: https://leanpub.com/deploying_rails_applications
You should have the following in your Gemfile:
gem 'unicorn', '~> 4.8.3'
group :development do
gem 'capistrano', '~> 3.2.1'
# rails specific capistrano functions
gem 'capistrano-rails', '~> 1.1.0'
# integrate bundler with capistrano
gem 'capistrano-bundler'
# if you are using Rbenv
gem 'capistrano-rbenv', "~> 2.0"
# include helper tasks
gem 'capistrano-cookbook', require: false
end