On Tue, Nov 22, 2011 at 10:39, Mario Ruiz <tcblues / gmail.com> wrote:

> Hi, I would like to know if it is possible to run an script without
> waiting to be run. I mean, can I call another ruby script and not be
> waiting for it to finish.

If you are running this on a Unix-type machine (including Linux and
Mac), you can "background" the second script by just putting an
ampersand (&) after the command, as in:

  system("ruby myScript.rb &")

the same way you would do to just run it in the background manually.

Now if you're on Windows, that's a whole 'nother story.  You might
still be able to have the first script explicitly create a child
process that would replace itself with the second one.  Google "fork
and exec" for how this is usually done in most languages; I haven't
looked into it in Ruby.

-Dave

-- 
LOOKING FOR WORK! What: Ruby (on/off Rails), Python, other modern languages.
Where: Northern Virginia, Washington DC (near Orange Line), and remote work.
See: davearonson.com (main) * codosaur.us (code) * dare2xl.com (excellence).
Specialization is for insects. (Heinlein) - Have Pun, Will Babble! (Aronson)