Passenger restart problems

I am following the Passenger/Capistrano/Git deployment process outlined
in Chapter 28 of the Third Edition of Agile Development book. Everything
seems to work well except being able to restart my application. I am on
Ubuntu 8.10. Here is my configuration info:

  1. httpd.conf file in /etc/apache2 is as follows:

LoadModule passenger_module
/opt/ruby-enterprise/lib/ruby/gems/1.8/gems/passenger-2.2.1/ext/apache2/mod_passenger.so
PassengerRoot
/opt/ruby-enterprise/lib/ruby/gems/1.8/gems/passenger-2.2.1
PassengerRuby /opt/ruby-enterprise/bin/ruby

<VirtualHost *:80>
ServerName localhost
DocumentRoot /home/bruparel/r_work/insurance/current/public/
<Directory /home/bruparel/r_work/insurance/current/public>
Order allow,deny
Allow from all

  1. Here is the Capistrano deploy.rb file:

set :application, “insurance”
set :user, “bruparel”
set :admin_runner, “bruparel”
set :domain, ‘192.168.1.105’

role :app, domain
role :web, domain
role :db, domain, :primary => true

default_run_options[:pty] = true
set :repository, “#{user}@#{domain}:git/#{application}.git”
set :deploy_to, “/home/#{user}/r_work/#{application}”

set :scm, “git”
set :branch, “master”
set :deploy_via, :remote_cache
set :scm_verbose, true
set :use_sudo, false

namespace :deploy do
desc “Restart Application”
task :restart do
run “touch #{current_path}/tmp/restart.txt”
end
end

When I run cap deploy:restart, I can see the restart.txt file is being
“touched” correctly by Capistrano since the timestamp changes. However,
Passenger fails to restart my application, I have to manually restart
Apache for my app to pick up redeployed changes.

Any help would be appreciated.

Thanks.

Bharat