Skip to content

Instantly share code, notes, and snippets.

@bsodmike
Created April 10, 2011 21:33
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save bsodmike/912747 to your computer and use it in GitHub Desktop.
Save bsodmike/912747 to your computer and use it in GitHub Desktop.
Capistrano-ext puzzling behaviour....
cap deploy:restart
triggering start callbacks for `deploy:restart'
* executing `multistage:ensure'
*** Defaulting to `production'
* executing `production'
* executing `deploy:restart'
[DEPRECATED] `deploy:restart` is going to be changed to Passenger mod_rails' method after 2.5.9 - see http://is.gd/2BPeA
* executing "/home/*******/current/script/process/reaper"
BUT!!
cap production deploy:restart
* executing `production'
triggering start callbacks for `deploy:restart'
* executing `multistage:ensure'
* executing `deploy:restart'
* executing "touch /home/********/current/tmp/restart.txt"
servers: ["****.com"]
[****.com] executing command
command finished in 1712ms
@bsodmike
Copy link
Author

This was fixed by adding the following into deploy.rb, irrespective of the definition in production.rb

# Default config for 'cap deploy:restart'.  This prevents using the
# script/reaper helper as per https://gist.github.com/912747

# If you are using Passenger mod_rails uncomment this:
# if you're still using the script/reapear helper you will need
# these http://github.com/rails/irs_process_scripts
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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment