On 25.02.2007 05:52, badcherry wrote:
> I am wanting inside of a ruby script to execute another ruby script in
> a subprocess in the same manner as exec().  As first thought I
> considered seeing if you can lookup the ruby executable path from
> within ruby, but I couldn't find a way of doing it.  If that was the
> case you could just say exec("/usr/bin/ruby " + "file.rb").

Depending on the platform you can use fork like this:

child_pid = fork do
   # child code
   load "file.rb"
end
# ...
Process.wait(child_pid)
print "Child ", child_pid, " exited with ", $?.exitstatus, "\n"

See
http://www.ruby-doc.org/core/classes/Kernel.html#M005750
http://www.ruby-doc.org/docs/ProgrammingRuby/html/tut_threads.html

HTH

	robert