Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Capistrano will not create releases

When I run cap deploy, Capistrano will attempt to create a folder such as $HOME/sites/MY_APP/releases/TIMESTAMP. I can see the command attempting to run, but it will not actually create the folder.

I can copy the command directly out of the Capistrano output and run the command over SSH and it works great with no problems.

The command looks something so:

cp -RPp /home/some_user/sites/my_cool_app/shared/cached-copy /home/some_user/sites/my_cool_app/releases/20111123164239 && (echo 59bf115868c2430cd0475ca1596998f1cfa3c084 > /home/some_user/sites/my_cool_app/releases/20111123164239/REVISION)

Why would the command fail through Capistrano, but succeed through an SSH terminal?

like image 759
RyanScottLewis Avatar asked Nov 23 '11 16:11

RyanScottLewis


1 Answers

I'm still not sure where the problem spans from but removing the line:

set :deploy_via, :remote_cache

Solved things for me. It looks like a bug where the releases directory isn't being created and so removing that line skips that step. A better approach if you want to keep the remote_cache is probably to add another step to setup like so:

after "deploy:setup", "deploy:create_release_dir"
namespace :deploy do
  task :create_release_dir, :except => {:no_release => true} do
    run "mkdir -p #{fetch :releases_path}"
  end
end
like image 157
Steve Smith Avatar answered Oct 20 '22 03:10

Steve Smith