Restart Passenger/Rails 6 in Capistrano 3

5 views
Skip to first unread message

Scott Olmsted

unread,
Nov 30, 2021, 5:22:54 PM11/30/21
to SD Ruby
Not long ago I upgraded a Rails project I have maintained and enhanced since 2010 (!) from Rails 2 (!) to Rails 6. As part of the upgrade I moved up to Capistrano 3.

But I have not been able to get a deploy to restart Rails running under Passenger. I've tried two gems: 'capistrano-passenger' and 'capistrano-passenger-restart' and neither works though I see the task executed:

$ cap project1 deploy --trace
....
** Invoke deploy:restart (first_time)
** Execute deploy:restart

I've also tried executing a shell command to touch tmp/restart.txt with this task:

task :restart do
on roles(:app) do
within current_path do
execute :touch, 'tmp/restart.txt'
end
end
end

without success.

So if anyone is using Capistrano 3 and Passenger, how do you restart Rails after a deploy?

Thanks,
Scott

Reply all
Reply to author
Forward
0 new messages