Setting where Capistrano deploys my Rails App

August 15, 2014 1.1k views

In my capistrano deploy.rb file, I'm specifying where my app should be deployed to. I want to update any files that have changes in /home/rails/ but Capistrano deployes to current/<hash> regardless of my settings. Is there any way around this?

1 comment
1 Answer

Hi Shawn,

This is the way capistrano works : it allows you to rollback any release that will build on error, by using symlinks between the releases builded and a shared folder. As the matter of fact, the releases that are build are stored in the shared root, in the "releases" folder.

In addition to this information, you need to configure capistrano to retrieve your source in a git repository, to make the changes effective after your code push. Each time capistrano will make a build, it will retrieve the last commit from the repository, and build into the "releases" folder of the shared directory.

If you didn't make any commit and push to your upstream repository, capistrano will keep building the same version of the files in your current directory, as each build released was done from the same source code.

I am not sure this is the good answer, but it seems like you were not using any git repository to deliver your code : it seemed to be the appropriate answer.

Having a look at the output of cap -T or at your deploy.rb file could be really useful to give you the right answer



Have another answer? Share your knowledge.