Razvan Draghici

Developer, designer and vinyl collector.


Capistrano 3, Rails and Ubuntu 14.04

I recently tried deploying a new Rails 4 app and had the opportunity to try the revamped Capistrano 3. I will share my troubles and the solutions I came up with. This was a learning process and I wouldn’t be surprised if someone comes up with a better solution or something that I overlooked in the process.

Here it goes. This is not a Capistrano 3 Rails tutorial but rather tackles one particular problem with my setup: running sudo commands during the deployment setup.

I usually create a deployer user for this and set the forward_agent option to true in order to use my local user’s keys to login. I followed a sample github app and the comments on the default configuration files to configure my setup which is pretty straight forward:

  • Nginx for the reverse proxy
  • Unicorn for app server

From what I read on the interwebs the general trend is to keep the unicorn init script, the...

Continue reading →