I've finally gotten capistrano to work on my website, however, I cannot seem to get the restart part of the application to work. What I want todo is setup capistrano to restart the mongrel cluster that is running the rails app after a deploy has gone through. Since I used passenger to install everything, I have no clue how to restart the mongrel cluster.
Does anyone know how todo this? In each tutorial tha开发者_StackOverflow中文版t I've read, it mentions that there should be a restart.txt file in the /tmp folder of the app, however I cannot find anything that explains how to restart it... or what to put in the file.
I think adding this task to your deploy.rb file should do
namespace :deploy do task :restart do run "touch #{current_path}/tmp/restart.txt" end end
Basically this will run the touch tmp/restart.txt
in the rails root directory which will restart passenger
精彩评论