The implementation of 'sudo' in capistrano is a little flawed. It ought to wrap the command in a 'sh -c' wrapper to make sure that the sudo privileges apply to the entire command string and not just the first command. At the moment you have to do that manually.
<br><br>To do what you want do this<br><br>sudo <<-CMD<br> sh -c "cd #{current_path} && mongrel_rails start"<br>CMD<br><br><br>The other problem is that capistrano is a little quick of the mark when shutting down a connection - often before the last program has had a chance to catch HUP signals. If this happens use.
<br><br>sudo <<-CMD<br> sh-c "cd #{current_path} && nohup mongrel_rails start >/dev/null"<br>CMD<br><br>Rgs<br><br>NeilW<br>