Had a similar issue, tried to run this command on server and got an error
touch: cannot touch 'myappdir/releases/20140416074158/tmp/restart.txt': No such file or directory
, so I simply added a line to create a release_path/tmp
dir:
desc 'Restart application'
task :restart do
on roles(:web), in: :sequence, wait: 5 do
execute :mkdir, '-p', "#{ release_path }/tmp"
execute :touch, release_path.join('tmp/restart.txt')
end
end