login community faq

I have a capistrano deploy script that works great except for the restart task. I have it run bin/restart but it never returns control back. The restart does actually work it's just that capistrano doesn't realize the command is finished. I've even run an 'ls' command afterwards "some_path/bin/restart;ls" and have tried returning true "some_path/bin/restart;true" but neither helped. The ls command ran and returned a listing but never 'exited'.

The restart task is below (site contains the rails deployment directories/symbolic links).

1
2
3
4
5
6
set :deploy_to, "/home/<username>/webapps/<application>/site"
namespace :deploy do
  task :restart, :roles => :app, :except => { :no_release => true } do
    run "#{deploy_to}/../bin/restart"
  end
end

Oddly I can run from the command line in a normal ssh session and it works fine - restarts in a couple seconds.

Any ideas?

asked Jun 05 '11 at 23:20

aleis's gravatar image

aleis
11

Hi,

This seems to be a bug in the net-ssh package as explaine dhere:

https://capistrano.lighthouseapp.com/projects/8716/tickets/79-capistrano-hangs-on-shell-command-for-many-computers-on-ruby-186-p368#ticket-79-48

Can you try upgrading it and see if that helps?

(Jun 05 '11 at 23:32) neeravk ♦♦ neeravk's gravatar image

My net-ssh package is at the latest in rubygems (2.1.4). I'm running ruby 1.8.7p302 through rvm as I wanted roughly the same version as on webfaction (though I'm not running ree). It's pretty late here - will try running a later ruby version tomorrow and see if there is any difference. Thanks for the link.

(Jun 06 '11 at 00:11) aleis aleis's gravatar image
Be the first one to answer this question!
If you have an answer to the above question, then use the form below. Otherwise, use the appropriate 'add new comment' button above to post your feedback.
toggle preview

Plans & prices    Sign up    Why WebFaction?    Contact us    Affiliate program    Support    Legal    Jobs    Blog    Control panel login
Powered by OSQA
© Copyright 2003-2012 Swarma Limited - WebFaction is a service of Swarma Limited