There are two ways I know of. To run a simple command like ls -l:
system ''ls -l''
%x{ls -l}
There are subtle differences between the two, but see which works for
you.
On Jul 23, 11:00 am, Jean Nibee
<rails-mailing-l...-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org>
wrote:> Hi
>
> I have an application that makes use of some tools that are provided on
> the installed system. (statistical model compilation).
>
> How should I do this gracefully w/ Rails.
>
> In the past (Java equivalent) I have relied on either an API being
> provided OR scraping the results of System.exec (I guess the Ruby
> equivalent is Runtime.exec)... not sure how to do this in Rails though.
>
> Thanks for any help.
> --
> Posted viahttp://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@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---