Report this

What is the reason for this report?

Setting where Capistrano deploys my Rails App

Posted on August 15, 2014

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?



This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

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

Regards,

– rustx

The developer cloud

Scale up as you grow — whether you're running one virtual machine or ten thousand.

Get started for free

Sign up and get $200 in credit for your first 60 days with DigitalOcean.*

*This promotional offer applies to new accounts only.