Thank you! Your feedback has been delivered
Thank you! Your feedback has been sent

Need to create capistrano v3 tasks

Hello. I'm new to capistrano deployment, so I have couple of questions.

I want two step deployment.

First one - setup task.

This will copy all my settings files. (rename database.example.yml to database.yml) Then I want to change settings on these files. (actually I don't want to log on server and do it. I want to be able to create my production settings at local machine (folder) and copy them via capistrano task)

Second one - run other tasks.

  1. Override generating assets. They will be generated if there is no assets and if they have changed from the last deployment. For speedup purpose.
  2. I have a lot of verification files like google analytics. What if I don't want commit them and just copy on each deployment from prep folder? Or is it bad idea?

How pro capistrano config looks like? What must have techniques should I use?

User Gravatar


Posted Apr 11 2014 5:46 UTC


  • Expired
  • ruby

4 Replies

Hi have you check this link? it is a detailed tutorial,explaining what you ask about.

User Gravatar


Posted Apr 11 2014 12:55 UTC

This is for capistrano 2. (PS. How do I comment on answers?)

User Gravatar


Posted Apr 11 2014 13:04 UTC

I put together a detailed Capistrano 3 Tutorial here along with full sample code which is available Github. I use this code on about 15 reasonably sized Rails applications and it performs well. It's also the sample code I use for my Book on Deploying Rails Applications.

Hope this is useful, Ben.

User Gravatar


Posted Apr 12 2014 11:40 UTC

Ben, this is not correct answer but the book looks very fresh, so I bought it. Thank you.

User Gravatar


Posted Apr 12 2014 13:21 UTC

Add a reply

By posting a reply on CodersClan you agree to our Terms & Conditions