Forum: Ruby on Rails How to restart an app under Passenger

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
Af3d60c180525341568a3d59dce2f48e?d=identicon&s=25 Avram Dorfman (avramd)
on 2009-03-22 05:03
(Received via mailing list)
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
Aad37b5f7116c8d1f547d23b37566032?d=identicon&s=25 Greg Donald (destiney)
on 2009-03-22 05:14
(Received via mailing list)
On Sat, Mar 21, 2009 at 11:02 PM, avramd <dorfman@est.org> 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 Donald
http://destiney.com/
5f94b9b346c2aa648a80bc259978e5bc?d=identicon&s=25 Colin Law (Guest)
on 2009-03-22 09:50
(Received via mailing list)
2009/3/22 Greg Donald <gdonald@gmail.com>

>
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
Af3d60c180525341568a3d59dce2f48e?d=identicon&s=25 Avram Dorfman (avramd)
on 2009-03-31 06:34
(Received via mailing list)
Just wanted to thank you both. Don't know why I was unable to find
this answer anywhere else.
5f94b9b346c2aa648a80bc259978e5bc?d=identicon&s=25 Colin Law (Guest)
on 2009-03-31 10:20
(Received via mailing list)
2009/3/22 Colin Law <clanlaw@googlemail.com>

>> 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.
4349a46c5faf5658a7240c22b3c4c21f?d=identicon&s=25 Bob Mundane (pgs)
on 2009-03-31 10:35
Avram Dorfman wrote:
> Just wanted to thank you both. Don't know why I was unable to find
> this answer anywhere else.

Was just here :
http://www.modrails.com/documentation/Users%20guid...
Cc6ae9862e93740637dbbea00b680616?d=identicon&s=25 Preethi Sivakumar (preethi)
on 2009-06-22 20:17
Avram Dorfman 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
Cc6ae9862e93740637dbbea00b680616?d=identicon&s=25 Preethi Sivakumar (preethi)
on 2009-06-22 20:31
Preethi Sivakumar wrote:
> Avram Dorfman 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.
This topic is locked and can not be replied to.