Ron Mr. wrote:> How would I go about calling system commands in a web app?
> Does anyone have any source available that I can look at?
>
> Thanks!
Try just using the ''backticks'' around your commands and
trapping the
results.
Ex: result = `ps -aef`
But keep in mind you hold up your request while it''s processing. If you
need something a bit more robust create a queue, have a thread process
the queue and put results into a a DB. The you can a monitoring page
(maybe using AJAX) To get the results/status for your processes.
--
Posted via http://www.ruby-forum.com/.
--~--~---------~--~----~------------~-------~--~----~
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
rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
To unsubscribe from this group, send email to
rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---