# Passenger restart problems

**URL:** <https://www.ruby-forum.com/t/passenger-restart-problems/166308>\
**Category:** Rails\
**Created:** [April 23, 2009, 7:23pm UTC](https://www.ruby-forum.com/t/passenger-restart-problems/166308 "2009-04-23T19:23:00Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![bruparel](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/e47774/32.png) [@bruparel](https://www.ruby-forum.com/u/bruparel)\
**Post date:** [April 23, 2009, 7:23pm UTC](https://www.ruby-forum.com/t/passenger-restart-problems/166308/1 "2009-04-23T19:23:00Z")

</div>

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
