On Jul 31, 4:16 am, Anthony Burns <[email protected]> wrote:
> Hello all,
>
> Is there a way to restart a Rails app from a controller? I'm trying to
> make it so that, in the backend, administrators can add plugins/themes/
> etc. to the running application without the need to actually go in to
> the server and restart the app. My first thought on this would be to
> just have the app restart on the next request after say, a plugin was
> activated. Has anyone done this before, or am I not taking the right
> approach?
>
well there's no builtin way of doing this, but i don't see why you
couldn't shell out and `monit restart ...` (assuming monit was
controlling your processes, replace as appropriate depending on your
deploying (eg touch tmp/restart.txt for passenger).
it's not very nice but would probably work. The obvious downside I can
think of is that if the administrator doesn't have shell access to the
server they could completely screw themselves without being able to
fix it (eg accidentally add a plugin that is broken or incompatible
with the app or the version of rails used)
Fred
> Cheers,
> SPC Anthony Burns
> Wisconsin ARNG
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby
on Rails: Talk" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---