# How to restart an app under Passenger

**URL:** <https://www.ruby-forum.com/t/how-to-restart-an-app-under-passenger/163569>\
**Category:** Rails\
**Created:** [March 22, 2009, 5:03am UTC](https://www.ruby-forum.com/t/how-to-restart-an-app-under-passenger/163569 "2009-03-22T05:03:47Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![avramd](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/aca169/32.png) [@avramd](https://www.ruby-forum.com/u/avramd)\
**Post date:** [March 22, 2009, 5:03am UTC](https://www.ruby-forum.com/t/how-to-restart-an-app-under-passenger/163569/1 "2009-03-22T05:03:47Z")

</div>

Hello,

I’m running a rails app on Dreamhost, which uses Passenger. Sometimes  
I have a very tiny change to make in my code, and have it take effect  
immediately. However I can’t figure out how to trigger Passenger to  
realize that I’ve changed my code.

The only thing I know how to do that works is to re-deploy my  
application via capistrano, which does a full SVN export to a brand-  
new directory, which of course completely replaces the entire rails  
app directory structure with a new one. Apparently Passenger figures  
that out.

However I have not been able to figure out a single smaller step that  
Passenger will notice. I’ve even tried "touch"ing the entire directory  
structure with the current date/time, and Passenger seems to happily  
ignore that.

Any ideas?

Thanks,  
Avram

---

<div class="post-metadata">

**Author:** ![avramd](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/aca169/32.png) [@avramd](https://www.ruby-forum.com/u/avramd)\
**Post date:** [March 22, 2009, 5:14am UTC](https://www.ruby-forum.com/t/how-to-restart-an-app-under-passenger/163569/2 "2009-03-22T05:14:53Z")

</div>

On Sat, Mar 21, 2009 at 11:02 PM, avramd [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> However I can’t figure out how to trigger Passenger to  
> realize that I’ve changed my code.
> 
> Any ideas?

touch tmp/restart.txt

–  
Greg D.  
[http://destiney.com/](http://destiney.com/)

---

<div class="post-metadata">

**Author:** ![avramd](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/aca169/32.png) [@avramd](https://www.ruby-forum.com/u/avramd)\
**Post date:** [March 22, 2009, 9:50am UTC](https://www.ruby-forum.com/t/how-to-restart-an-app-under-passenger/163569/3 "2009-03-22T09:50:44Z")

</div>

2009/3/22 Greg D. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)

> 

On my system passenger seems to automatically restart the server if  
tmp/restart.txt exists, then it deletes it. So all I have to do is have  
an  
empty tmp/restart.txt locally and when I deploy changes (I use rshell)  
restart.txt is transferred as it does not exist on the server. The  
server  
restarts and all is well.

This may not work for all as when I was investigating this I did find  
documentation that suggested the restart.txt was tested but not deleted.  
If  
your system works like this then you will have to touch it instead.

Colin

---

<div class="post-metadata">

**Author:** ![avramd](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/aca169/32.png) [@avramd](https://www.ruby-forum.com/u/avramd)\
**Post date:** [March 31, 2009, 6:34am UTC](https://www.ruby-forum.com/t/how-to-restart-an-app-under-passenger/163569/4 "2009-03-31T06:34:00Z")

</div>

Just wanted to thank you both. Don’t know why I was unable to find  
this answer anywhere else.

---

<div class="post-metadata">

**Author:** ![avramd](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/aca169/32.png) [@avramd](https://www.ruby-forum.com/u/avramd)\
**Post date:** [March 31, 2009, 10:20am UTC](https://www.ruby-forum.com/t/how-to-restart-an-app-under-passenger/163569/5 "2009-03-31T10:20:54Z")

</div>

2009/3/22 Colin L. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)

> > touch tmp/restart.txt
> 
> On my system passenger seems to automatically restart the server if  
> tmp/restart.txt exists, then it deletes it. So all I have to do is have an  
> empty tmp/restart.txt locally and when I deploy changes (I use rshell)  
> restart.txt is transferred as it does not exist on the server. The server  
> restarts and all is well.

I meant rsync of course, not rshell, fingers ignoring brain again.

---

<div class="post-metadata">

**Author:** ![avramd](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/aca169/32.png) [@avramd](https://www.ruby-forum.com/u/avramd)\
**Post date:** [March 31, 2009, 10:35am UTC](https://www.ruby-forum.com/t/how-to-restart-an-app-under-passenger/163569/6 "2009-03-31T10:35:58Z")

</div>

Avram D. wrote:

> Just wanted to thank you both. Don’t know why I was unable to find  
> this answer anywhere else.

Was just here :

> **[Phusion Passenger users guide index](https://www.phusionpassenger.com/documentation/Users%20guide.html)**

---

<div class="post-metadata">

**Author:** ![avramd](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/aca169/32.png) [@avramd](https://www.ruby-forum.com/u/avramd)\
**Post date:** [June 22, 2009, 8:31pm UTC](https://www.ruby-forum.com/t/how-to-restart-an-app-under-passenger/163569/7 "2009-06-22T20:31:27Z")

</div>

Preethi S. wrote:

> Avram D. wrote:
> 
> > Hello,
> > 
> > I’m running a rails app on Dreamhost, which uses Passenger. Sometimes  
> > I have a very tiny change to make in my code, and have it take effect  
> > immediately. However I can’t figure out how to trigger Passenger to  
> > realize that I’ve changed my code.
> > 
> > The only thing I know how to do that works is to re-deploy my  
> > application via capistrano, which does a full SVN export to a brand-  
> > new directory, which of course completely replaces the entire rails  
> > app directory structure with a new one. Apparently Passenger figures  
> > that out.
> > 
> > However I have not been able to figure out a single smaller step that  
> > Passenger will notice. I’ve even tried "touch"ing the entire directory  
> > structure with the current date/time, and Passenger seems to happily  
> > ignore that.
> > 
> > Any ideas?
> > 
> > Thanks,  
> > Avram
> 
> Hi,  
> I was encountering some issues in uploading my application in dreamhost  
> when i saw your post in this.  
> I’m also using dreamhost with passenger.  
> I followed the steps given, to upload my application into the server but  
> it says “Ruby on Rails application could not be started”…  
> What might be the problem(The application runs perfectly in my system)  
> I’m a newbie to rails , your help is much appreciated. It is much  
> urgent. Please help.  
> Thanks in advance  
> Preethi  
> Wanted to add the error I’m geting in production log

* * *

## Status: 500 Internal Server Error No route matches “/rails/info/properties” with {:method=\>:get} /usr/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/action\_controller/routing/recognition\_optimisation.rb:66:in `recognize_path' /usr/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/action_controller/routing/route_set.rb:386:in `recognize’ /usr/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/action\_controller/dispatcher.rb:182:in `handle_request' /usr/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/action_controller/dispatcher.rb:110:in `dispatch\_unlocked’ /usr/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/action\_controller/dispatcher.rb:123:in `dispatch' /usr/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/action_controller/dispatcher.rb:122:in `synchronize’ /usr/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/action\_controller/dispatcher.rb:122:in `dispatch' /usr/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/action_controller/dispatcher.rb:132:in `dispatch\_cgi’ /usr/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/action\_controller/dispatcher.rb:39:in `dispatch' /dh/passenger/lib/phusion_passenger/railz/request_handler.rb:45:in `process\_request’

I’m not able to understand anything in this. anyone please help.

---

<div class="post-metadata">

**Author:** ![avramd](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/aca169/32.png) [@avramd](https://www.ruby-forum.com/u/avramd)\
**Post date:** [June 22, 2009, 8:17pm UTC](https://www.ruby-forum.com/t/how-to-restart-an-app-under-passenger/163569/8 "2009-06-22T20:17:43Z")

</div>

Avram D. wrote:

> Hello,
> 
> I’m running a rails app on Dreamhost, which uses Passenger. Sometimes  
> I have a very tiny change to make in my code, and have it take effect  
> immediately. However I can’t figure out how to trigger Passenger to  
> realize that I’ve changed my code.
> 
> The only thing I know how to do that works is to re-deploy my  
> application via capistrano, which does a full SVN export to a brand-  
> new directory, which of course completely replaces the entire rails  
> app directory structure with a new one. Apparently Passenger figures  
> that out.
> 
> However I have not been able to figure out a single smaller step that  
> Passenger will notice. I’ve even tried "touch"ing the entire directory  
> structure with the current date/time, and Passenger seems to happily  
> ignore that.
> 
> Any ideas?
> 
> Thanks,  
> Avram

Hi,  
I was encountering some issues in uploading my application in dreamhost  
when i saw your post in this.  
I’m also using dreamhost with passenger.  
I followed the steps given, to upload my application into the server but  
it says “Ruby on Rails application could not be started”…  
What might be the problem(The application runs perfectly in my system)  
I’m a newbie to rails , your help is much appreciated. It is much  
urgent. Please help.  
Thanks in advance  
Preethi
