I am currently looking for a software/web development job preferably as a Rails-based developer.
Please email me at weston@westonganger.com. Thanks in advance for any leads!

Upgrade Your Capistrano Config To Restart Using The Passenger Restart-app Tool

Posted by Weston Ganger

With the release of Passenger 4, they included a app restart command that functions better the touch tmp/restart.txt method.

With the old method the app would restart on the next request, using the restart-app command that app will restart immediately.

Here is how to upgrade your deploy.rb file for Capistrano.

# config/deploy.rb

# Capistrano 2
run "sudo passenger-config restart-app --ignore-app-not-running #{deploy_to}"

# Capistrano 3
execute :sudo, "passenger-config restart-app --ignore-app-not-running #{deploy_to}"
  • The --ignore-app-not-running is required otherwise your deploy might fail.
  • If you recieve an error regarding no Phusion Passenger Served Apps, dont worry its not a bad error

Related External Links:

Article Topic:Software Development - Rails

Date:November 03, 2015

Recommended Posts