views:

24

answers:

1

Hey Guys.

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 that 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.

A: 

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

Rishav Rastogi
Right, but what's inside the restart.txt file?
matsko
Nothing!!... it doesn't need to have any details
Rishav Rastogi