capifony no such file or directory on cap deploy - capistrano

i've the following easy capifony script to copy the local project to my server:
set :application, "project"
set :domain, "88.88.88.88"
set :deploy_to, "/var/www/project"
set :app_path, "app"
set :user, "root"
set :scm, :git
set :repository, "file:///Users/berlin/vagrant-workspace/essen"
set :deploy_via, :capifony_copy_local
set :use_composer, true
set :use_composer_tmp, false
set :copy_vendors, true
role :web, domain
role :app, domain, :primary => true
set :use_sudo, false
set :keep_releases, 3
logger.level = Logger::MAX_LEVEL
This is my output for cap:deploy:setup:
* 2014-10-06 21:55:38 executing `deploy:setup'
* executing "mkdir -p /var/www/project /var/www/project/releases /var/www/project/shared"
servers: ["88.88.88.88"]
[88.88.88.88] executing command
command finished in 119ms
* executing "chmod g+w /var/www/project /var/www/project/releases /var/www/project/shared"
servers: ["88.88.88.88"]
[88.88.88.88] executing command
command finished in 144ms
And then i can't deploy because of a missing folder. It looks like that the script doesn't create the folder inside releases.
cap deploy
* 2014-10-06 21:55:59 executing `deploy'
* 2014-10-06 21:55:59 executing `deploy:update'
** transaction: start
* 2014-10-06 21:55:59 executing `deploy:update_code'
triggering before callbacks for `deploy:update_code'
--> Updating code base with capifony_copy_local strategy
--> Using Copy Local Strategy
executing locally: "git ls-remote file:///Users/berlin/vagrant-workspace/project HEAD"
command finished in 12ms
* getting (via checkout) revision a7ba07ac38fee4b5375c6d383886a906c1a551d5 to /var/folders/l6/ptd6l19s2vb98z6bbnb1k7b00000gq/T/20141006195559
executing locally: git clone -q file:///Users/berlin/vagrant-workspace/project /var/folders/l6/ptd6l19s2vb98z6bbnb1k7b00000gq/T/20141006195559 && cd /var/folders/l6/ptd6l19s2vb98z6bbnb1k7b00000gq/T/20141006195559 && git checkout -q -b deploy a7ba07ac38fee4b5375c6d383886a906c1a551d5
command finished in 72ms
* 2014-10-06 21:55:59 executing `symfony:composer:install'
triggering before callbacks for `symfony:composer:install'
* 2014-10-06 21:55:59 executing `symfony:composer:copy_vendors'
--> Copying vendors from previous release
* executing "vendorDir=/var/www/project/current/vendor; if [ -d $vendorDir ] || [ -h $vendorDir ]; then cp -a $vendorDir /var/www/project/releases/20141006195559; fi;"
servers: ["88.88.88.88"]
[88.88.88.88] executing command
command finished in 103ms
* 2014-10-06 21:56:00 executing `symfony:composer:get'
* executing "if [ -e /var/www/project/releases/20141006195559/composer.phar ]; then echo 'true'; fi"
servers: ["88.88.88.88"]
[88.88.88.88] executing command
command finished in 90ms
--> Downloading Composer
* executing "sh -c 'cd /var/www/project/releases/20141006195559 && curl -s http://getcomposer.org/installer | php'"
servers: ["88.88.88.88"]
[88.88.88.88] executing command
*** [err :: 88.88.88.88] sh: line 0: cd: /var/www/project/releases/20141006195559: No such file or directory
command finished in 106ms
*** [deploy:update_code] rolling back
* executing "rm -rf /var/www/project/releases/20141006195559; true"
servers: ["88.88.88.88"]
[88.88.88.88] executing command
command finished in 102ms
failed: "sh -c 'sh -c '\\''cd /var/www/project/releases/20141006195559 && curl -s http://getcomposer.org/installer | php'\\'''" on 88.88.88.88
I can't find any solution.
Does anybody have an idea for my problem? Thank you very much.

If someone will have the same problem. This is a working script for me:
set :application, "project"
set :domain, "88.88.88.88"
set :deploy_to, "/var/www/project"
set :app_path, "app"
set :user, "root"
set :scm, :git
set :repository, "file:///Users/berlin/vagrant-workspace/project"
set :deploy_via, :capifony_copy_local
set :use_composer, true
set :use_composer_tmp, true
role :web, domain
role :app, domain, :primary => true
set :use_sudo, false
set :keep_releases, 3
set :shared_files, ["app/config/parameters.yml"]
set :shared_children, [app_path + "/logs"]
#logger.level = Logger::MAX_LEVEL
after "deploy:finalize_update" do
capifony_pretty_print "--> Set permissions for writable directories"
run "chown -R www-data:www-data #{latest_release}/#{cache_path}"
run "chown -R www-data:www-data #{latest_release}/#{log_path}"
run "chmod -R 777 #{latest_release}/#{cache_path}"
puts "✔"
end
I don't know exactly the difference, but this snippet works fine.

Related

capistrano cannot run ssh: no such file or directory

I'm new to capistrano and I'm trying to set up a test project, but as you can guess, without much success. When I run cap deploy:update, I get following output:
$ cap deploy
* 2014-12-27 21:48:06 executing `deploy'
* 2014-12-27 21:48:06 executing `deploy:update'
** transaction: start
* 2014-12-27 21:48:06 executing `deploy:update_code'
executing locally: "git ls-remote git#github.com:hstandaert/test.git production"
command finished in 1281ms
* executing "git clone -q -b production git#github.com:hstandaert/test.git/customers/4/b/b/stocksolutions.be/httpd.www/private/releases/20141227204807 && cd /customers/4/b/b/stocksolutions.be/httpd.www/private/releases/20141227204807 && git checkout -q -b deploy 5604624725df4d3c7dd4f88fc77cfd5d9d8ddf26 && (echo 5604624725df4d3c7dd4f88fc77cfd5d9d8ddf26 > /customers/4/b/b/stocksolutions.be/httpd.www/private/releases/20141227204807/REVISION)"
servers: ["ssh.stocksolutions.be"]
stocksolutions.be#ssh.stocksolutions.be's password:
stocksolutions.be#ssh.stocksolutions.be's password:
[ssh.stocksolutions.be] executing command
** [ssh.stocksolutions.be :: out] error: cannot run ssh: No such file or directory
** [ssh.stocksolutions.be :: out] fatal: unable to fork
command finished in 1611ms
*** [deploy:update_code] rolling back
* executing "rm -rf /customers/4/b/b/stocksolutions.be/httpd.www/private/releases/20141227204807; true"
servers: ["ssh.stocksolutions.be"]
[ssh.stocksolutions.be] executing command
command finished in 957ms
failed: "sh -c 'git clone -q -b production git#github.com:hstandaert/test.git /customers/4/b/b/stocksolutions.be/httpd.www/private/releases/20141227204807 && cd /customers/4/b/b/stocksolutions.be/httpd.www/private/releases/20141227204807 && git checkout -q -b deploy 5604624725df4d3c7dd4f88fc77cfd5d9d8ddf26 && (echo 5604624725df4d3c7dd4f88fc77cfd5d9d8ddf26 > /customers/4/b/b/stocksolutions.be/httpd.www/private/releases/20141227204807/REVISION)'" on ssh.stocksolutions.be
And here's the deploy.rb file:
begin
require 'colored'
rescue LoadError
$stderr.puts <<-INSTALL
You need the both the capistrano-ext and colored gems to deploy this application
Install the gems like this:
gem install colored
INSTALL
exit 1
end
set :application, "stocksolutions"
set :repository, "git#github.com:hstandaert/test.git"
set :branch, "production"
set :user, 'stocksolutions.be'
set :deploy_to, "/customers/4/b/b/#{user}/httpd.www/private"
set :use_sudo, false
set :scm, :git
default_run_options[:pty] = true
server "ssh.stocksolutions.be", :app, :web
namespace :deploy do
task :start do ; end
task :stop do ; end
task :restart, :roles => :app, :except => { :no_release => true } do
run "#{try_sudo} touch #{File.join(current_path,'tmp','restart.txt')}"
end
end
Anyone who can spot my mistake?
Your log seems to suggest that either there is no ssh client installed in your deployment server, or the command cannot be found in the server's PATH.
Try if cloning the repo via https instead of ssh will work, by changing the following:
BEFORE
set :repository, "git#github.com:hstandaert/test.git"
AFTER
set :repository, "https://github.com/hstandaert/test.git"
You'll be asked to provide your login credentials for github to be able to clone the repo.

Capistrano tmp:dir error:cannot run git-ssh.sh: No such file or directory

on my server I´m not allowed to create an tmp folder that executes any content.
So with capistrano 3 I have the option to set a path for a kind of custom tmp folder.
Is there any syntax I have to consider, cause my settings execute an error with cap staging deploy:
INFO[f99c486e] Running /usr/bin/env mkdir -p custom_tmp/myproject/ on xxxx.de
DEBUG[f99c486e] Command: /usr/bin/env mkdir -p custom_tmp/myproject/
INFO[f99c486e] Finished in 1.140 seconds with exit status 0 (successful).
DEBUGUploading custom_tmp/myproject/git-ssh.sh 0.0%
INFOUploading custom_tmp/myproject/git-ssh.sh 100.0%
INFO[91b7d9b8] Running /usr/bin/env chmod +x custom_tmp/myproject/git-ssh.sh on xxxx.de
DEBUG[91b7d9b8] Command: /usr/bin/env chmod +x custom_tmp/myproject/git-ssh.sh
INFO[91b7d9b8] Finished in 0.080 seconds with exit status 0 (successful).
DEBUG[f4db290c] Running /usr/bin/env git ls-remote -h git#bitbucket.org:hallo/www.myproject.de.git on xxxx.de
DEBUG[f4db290c] Command: ( GIT_ASKPASS=/bin/echo GIT_SSH=custom_tmp/myproject/git-ssh.sh /usr/bin/env git ls-remote -h git#bitbucket.org:hallo/www.myproject.de.git )
DEBUG[f4db290c] 66791b22a61cd1af57d117a817129e491e83d88c refs/heads/master
DEBUG[f4db290c] Finished in 3.235 seconds with exit status 0 (successful).
INFO[74118c8e] Running /usr/bin/env mkdir -pv development/myproject/shared development/myproject/releases on xxxx.de
DEBUG[74118c8e] Command: /usr/bin/env mkdir -pv development/myproject/shared development/myproject/releases
INFO[74118c8e] Finished in 0.079 seconds with exit status 0 (successful).
INFO[10e40636] Running /usr/bin/env mkdir -pv development/myproject/shared/media on xxxx.de
DEBUG[10e40636] Command: /usr/bin/env mkdir -pv development/myproject/shared/media
INFO[10e40636] Finished in 0.086 seconds with exit status 0 (successful).
DEBUG[38889a64] Running /usr/bin/env [ -f development/myproject/current/REVISION ] on xxxx.de
DEBUG[38889a64] Command: [ -f development/myproject/current/REVISION ]
DEBUG[38889a64] Finished in 0.079 seconds with exit status 1 (failed).
DEBUG[5dfc387f] Running /usr/bin/env [ -f development/myproject/repo/HEAD ] on xxxx.de
DEBUG[5dfc387f] Command: [ -f development/myproject/repo/HEAD ]
DEBUG[5dfc387f] Finished in 0.095 seconds with exit status 1 (failed).
DEBUG[44d0214c] Running /usr/bin/env if test ! -d development/myproject/; then echo "Directory does not exist 'development/myproject/'" 1>&2; false; fi on xxxx.de
DEBUG[44d0214c] Command: if test ! -d development/myproject/; then echo "Directory does not exist 'development/myproject/'" 1>&2; false; fi
DEBUG[44d0214c] Finished in 0.079 seconds with exit status 0 (successful).
INFO[dac1f8fd] Running /usr/bin/env git clone --mirror git#bitbucket.org:hallo/www.myproject.de.git development/myproject/repo on xxxx.de
DEBUG[dac1f8fd] Command: cd development/myproject/ && ( GIT_ASKPASS=/bin/echo GIT_SSH=custom_tmp/myproject/git-ssh.sh /usr/bin/env git clone --mirror git#bitbucket.org:hallo/www.myproject.de.git development/myproject/repo )
DEBUG[dac1f8fd] Cloning into bare repository development/myproject/repo...
DEBUG[dac1f8fd] error: cannot run custom_tmp/myproject/git-ssh.sh: No such file or directory
DEBUG[dac1f8fd] fatal: unable to fork
cap aborted!
SSHKit::Runner::ExecuteError: Exception while executing on host xxxx.de: git exit status: 128
git stdout: Nothing written
git stderr: Nothing written
On my server the folder "custom_tmp/myproject/" ist still there with there with the git-ssh.sh. So I wonder about the error.
Here my deploy.rb
#config valid only for Capistrano 3.1
lock '3.2.1'
set :application, 'myproject'
set :repo_url, 'git#bitbucket.org:hallo/www.myproject.de.git'
# Default deploy_to directory is /var/www/my_app
set :deploy_to, 'development/myproject/'
#Default value for :scm is :git
#set :scm, :git
#Default value for :format is :pretty
#set :format, :pretty
# Default value for :log_level is :debug
set :log_level, :debug
#Default value for :pty is false
set :pty, true
# Default value for :linked_files is []
# set :linked_files, %w{config/database.yml}
# Default value for linked_dirs is []
set :linked_dirs, %w{media}
#tmp dir
set :tmp_dir,"custom_tmp"
namespace :deploy do
desc 'Restart application'
task :restart do
on roles(:app) do
# Your restart mechanism here, for example:
# execute :touch, release_path.join('tmp/restart.txt')
end
end
end
Okay, I´m one step closer.
The path to my tmp dir wasn´t correct.
I did an pwd on my server and put the shown path in front of my "custom_tmp" like:
set :tmp_dir,"/cutomer/homeages/13/233232/custom_tmp"
But the cap staging deploy interrupt by an new error depending on the repo folder:
fatal: destination path 'development/www.myproject.com/repo' already exists and is not an empty directory.
okay,
I got it.
Have to do the same with the:
set :deploy_to

capistrano symlink permission denied

I am using cap deploy to deploy to staging. cap deploy:setup created the releases and shared folder.
This is the deploy.rb code.
set :stages, %w(staging production)
set :default_stage, "staging"
set :stage_dir, "capistrano"
require 'capistrano/ext/multistage'
set :application, "application"
set :repository, "git#github.com:owner/#{application}.git"
set :scm, :git
set :local_user, ENV['USER'] || ENV['USERNAME'] || "unknown"
set :user, "server_owner"
set :deploy_via, :copy
set :use_sudo, false
set :copy_remote_dir, "/home/#{user}/tmp/capistrano"
namespace :deploy do
desc "Change Permissions"
task :change_permissions, :except => { :no_release => true } do
run "find #{current_path}/ -type d -exec chmod 755 {} \\;"
run "find #{current_path}/ -type f -exec chmod 644 {} \\;"
end
desc "Create symlinks for shared items"
task :update_shared_symlinks, :except => { :no_release => true} do
< ln -s command to create the links>
end
end
before "deploy:finalize_update", "deploy:update_shared_symlinks"
And this is the staging code
role :app, "ipaddress"
set :branch, "staging"
set :deploy_to, "/home/#{user}/_#{application}_beta/"
When deploying with cap deploy i get the following error
ln: creating symbolic link `/home/narayan/_instaprint_beta/releases/20130130102815/': Permission denied
Can anyone tell me why this is happening?
Two things:
Use chmod straight away instead of a find and exec, like so: chmod 755 #{current_path}
Check if the server_owner user has permission to current_path. If not, then use sudo like so: sudo "chmod 755 #{current_path}"

Deploy failed with Gitolite and Capistrano

In a project, I use gitolite and capistrano. It's work fine for another developper.
The issue is it's doesn't work for me : I can't actually deploy with capistrano.
When I run the cap deploy command, it ask me the password of the server (here, ok) and the password of the gitolite, which doesn't exist.
C:\wamp\www\miiaou>cap deploy
* ←[32m2012-12-12 15:12:34 executing `deploy'←[0m
* ←[32m2012-12-12 15:12:34 executing `deploy:update'←[0m
** transaction: start
* ←[32m2012-12-12 15:12:34 executing `deploy:update_code'←[0m
updating the cached checkout on all servers
←[33mexecuting locally: "git ls-remote gitolite#miiaou.fr:miiaou master"←[0m
←[2;37mcommand finished in 1351ms←[0m
* ←[33mexecuting "if [ -d /home/miiaou/miiaou_prod/shared/cached-copy ]; then
cd /home/miiaou/miiaou_prod/shared/cached-copy && git fetch -q origin && git fet
ch --tags -q origin && git reset -q --hard 117b2bb34817d89a1fbe34f1891ac3c823a23
fce && git clean -q -d -x -f; else git clone -q gitolite#miiaou.fr:miiaou /home/
miiaou/miiaou_prod/shared/cached-copy && cd /home/miiaou/miiaou_prod/shared/cach
ed-copy && git checkout -q -b deploy 117b2bb34817d89a1fbe34f1891ac3c823a23fce; f
i"←[0m
servers: ["miiaou.fr"]
Password:
[miiaou.fr] executing command
** [miiaou.fr :: out] Error reading response length from authentication socket.
** [miiaou.fr :: out] gitolite#miiaou.fr's password:
Password:
** [miiaou.fr :: out]
** ←[31m[miiaou.fr :: out] Permission denied, please try again.
** gitolite#miiaou.fr's password:←[0m
Password:
** [miiaou.fr :: out]
** ←[31m[miiaou.fr :: out] Permission denied (publickey,password).
** fatal: The remote end hung up unexpectedly←[0m
←[2;37mcommand finished in 36755ms←[0m
*** [←[34mdeploy:update_code←[0m] ←[34mrolling back←[0m
* ←[33mexecuting "rm -rf /home/miiaou/miiaou_prod/releases/20121212141318; tru
e"←[0m
servers: ["miiaou.fr"]
[miiaou.fr] executing command
←[2;37mcommand finished in 133ms←[0m
failed: "if [ -d /home/miiaou/miiaou_prod/shared/cached-copy ]; then cd /home/mi
iaou/miiaou_prod/shared/cached-copy && git fetch -q origin && git fetch --tags -
q origin && git reset -q --hard 117b2bb34817d89a1fbe34f1891ac3c823a23fce && git
clean -q -d -x -f; else git clone -q gitolite#miiaou.fr:miiaou /home/miiaou/miia
ou_prod/shared/cached-copy && cd /home/miiaou/miiaou_prod/shared/cached-copy &&
git checkout -q -b deploy 117b2bb34817d89a1fbe34f1891ac3c823a23fce; fi" on miiao
u.fr
I don't understand why it need a password because the ssh keys works.
Can anybody help me?
Thanks
edit : if that help, here my deploy.rb
require "bundler/capistrano"
# Rails 3.1 : laod capistrano task to precompile assets
# bundle exec rake RAILS_ENV=staging RAILS_GROUPS=assets assets:precompile
load "deploy/assets"
set :stages, %w(production)
set :default_stage, "production"
set :application, "miiaou"
set :repository, "gitolite#miiaou.fr:#{application}"
set :domain, "miiaou.fr"
# If you aren't deploying to /u/apps/#{application} on the target
# servers (which is the default), you can specify the actual location
# via the :deploy_to variable:
set :deploy_to, "/home/miiaou/#{application}_prod"
set :shared_path, "/home/miiaou/#{application}_prod/shared"
set :scm, "git"
set :branch, "master"
# Agent Forwarding : use local keys for git
ssh_options[:forward_agent] = true
set :deploy_via, :remote_cache
default_run_options[:pty] = true
ssh_options[:paranoid] = false
set :user, "root"
set :runner, "root"
set :use_sudo, false
role :web, domain # Your HTTP server, Apache/etc
role :app, domain # This may be the same as your `Web` server
role :db, domain, :primary => true # This is where Rails migrations will run
# Add RVM's lib directory to the load path.
#$:.unshift(File.expand_path('./lib', ENV['rvm_path']))
#require "rvm/capistrano"
#set :rvm_ruby_string, '1.9.2'
task :clean_assets, :roles => :app do
run "rm -rf #{shared_path}/assets/*"
end
task :more_symlinks, :roles => :app do
# linkage des fichiers de config
%w(database).each do |config_file|
run "ln -nfs #{shared_path}/config/#{config_file}.yml #{release_path}/config/#{config_file}.yml"
end
run "ln -nfs #{shared_path}/assets #{release_path}/public/assets"
end
task :restart_daemons, :roles => :app do
#run "cd #{release_path} && bundle exec whenever --set 'environment=#{rails_env}' --update-crontab"
#run "cd #{release_path} && RAILS_ENV=#{rails_env} ruby script/delayed_job restart"
end
# If you are using Passenger mod_rails uncomment this:
namespace :deploy do
task :start do ; end
task :stop do ; end
task :restart, :roles => :app, :except => { :no_release => true } do
run "#{try_sudo} touch #{File.join(current_path,'tmp','restart.txt')}"
end
end
before :'deploy:assets:precompile', :more_symlinks

Rails 3 - Script doesn't run after cap:deploy

I want to run few commands when i start application on server.
So, i wrote such script in config/deploy.rb:
desc "Start sphinx"
task :start_sphinx, :roles => :app do
run "cd #{current_path} && bundle install --without development test && bundle install --deployment && chmod 777 -R #{current_path}/tmp/ && rake thinking_sphinx:configure && rake thinking_sphinx:start"
end
But when i print
$ cap deploy
It doesn't work. So, please, tell me what is wrong!
Here is log from terminal:
$ cap deploy
* executing `deploy'
* executing `deploy:update'
** transaction: start
* executing `deploy:update_code'
updating the cached checkout on all servers
executing locally: "git ls-remote git://github.com/Loremaster/sample_app.git master"
command finished in 367ms
* executing "if [ -d /vol/www/apps/ror_tutorial/shared/cached-copy ]; then cd /vol/www/apps/ror_tutorial/shared/cached-copy && git fetch -q origin && git fetch --tags -q origin && git reset -q --hard b5073e9b9aefd98873489bb6e97249593ea1a978 && git clean -q -d -x -f; else git clone -q git://github.com/Loremaster/sample_app.git /vol/www/apps/ror_tutorial/shared/cached-copy && cd /vol/www/apps/ror_tutorial/shared/cached-copy && git checkout -q -b deploy b5073e9b9aefd98873489bb6e97249593ea1a978; fi"
servers: ["188.127.224.136"]
Password:
[188.127.224.136] executing command
command finished in 3070ms
copying the cached version to /vol/www/apps/ror_tutorial/releases/20120125165835
* executing "cp -RPp /vol/www/apps/ror_tutorial/shared/cached-copy /vol/www/apps/ror_tutorial/releases/20120125165835 && (echo b5073e9b9aefd98873489bb6e97249593ea1a978 > /vol/www/apps/ror_tutorial/releases/20120125165835/REVISION)"
servers: ["188.127.224.136"]
[188.127.224.136] executing command
command finished in 49970ms
* executing `deploy:finalize_update'
* executing "chmod -R g+w /vol/www/apps/ror_tutorial/releases/20120125165835"
servers: ["188.127.224.136"]
[188.127.224.136] executing command
command finished in 1023ms
* executing "rm -rf /vol/www/apps/ror_tutorial/releases/20120125165835/log /vol/www/apps/ror_tutorial/releases/20120125165835/public/system /vol/www/apps/ror_tutorial/releases/20120125165835/tmp/pids &&\\\n mkdir -p /vol/www/apps/ror_tutorial/releases/20120125165835/public &&\\\n mkdir -p /vol/www/apps/ror_tutorial/releases/20120125165835/tmp &&\\\n ln -s /vol/www/apps/ror_tutorial/shared/log /vol/www/apps/ror_tutorial/releases/20120125165835/log &&\\\n ln -s /vol/www/apps/ror_tutorial/shared/system /vol/www/apps/ror_tutorial/releases/20120125165835/public/system &&\\\n ln -s /vol/www/apps/ror_tutorial/shared/pids /vol/www/apps/ror_tutorial/releases/20120125165835/tmp/pids"
servers: ["188.127.224.136"]
[188.127.224.136] executing command
command finished in 150ms
* executing "find /vol/www/apps/ror_tutorial/releases/20120125165835/public/images /vol/www/apps/ror_tutorial/releases/20120125165835/public/stylesheets /vol/www/apps/ror_tutorial/releases/20120125165835/public/javascripts -exec touch -t 201201251659.26 {} ';'; true"
servers: ["188.127.224.136"]
[188.127.224.136] executing command
** [out :: 188.127.224.136] find: `/vol/www/apps/ror_tutorial/releases/20120125165835/public/images': No such file or directory
** [out :: 188.127.224.136] find: `/vol/www/apps/ror_tutorial/releases/20120125165835/public/stylesheets': No such file or directory
** [out :: 188.127.224.136] find: `/vol/www/apps/ror_tutorial/releases/20120125165835/public/javascripts': No such file or directory
command finished in 566ms
* executing `deploy:symlink'
* executing "rm -f /vol/www/apps/ror_tutorial/current && ln -s /vol/www/apps/ror_tutorial/releases/20120125165835 /vol/www/apps/ror_tutorial/current"
servers: ["188.127.224.136"]
[188.127.224.136] executing command
command finished in 56ms
** transaction: commit
* executing `deploy:restart'
* executing "sudo -p 'sudo password: ' touch /vol/www/apps/ror_tutorial/current/tmp/restart.txt"
servers: ["188.127.224.136"]
[188.127.224.136] executing command
command finished in 163ms
It looks like you are missing the callback. For example, if you wanted to run your script after the code has been updated, you can use an after callback like
after "deploy:update_code", "start_sphinx"
For more info on callbacks, check out the callbacks rdoc