Starting another programs from inside

I searched ruby-talk but I could not find the answer.
I want to start one program from inside another.

test.rb
puts ‘hi’

test1.rb
test.rb

test1.rb results => Exec format error - test.rb
(Errno::ENOEXEC)

Thanks
Jeff

On Aug 20, 2007, at 10:41 , Jeffrey B. wrote:

test1.rb
test.rb

test1.rb results => Exec format error - test.rb
(Errno::ENOEXEC)

I think you need to make test.rb executable, which is what
Errno::ENOEXEC is telling you.

Michael G.
grzm seespotcode net

Alle lunedì 20 agosto 2007, Michael G. ha scritto:

Michael G.
grzm seespotcode net

Or you can use

ruby test.rb

Of course, this assumes that the ruby executable is actually called
ruby. By
the way, using the backtick syntax, the output of the executed program
is not
displayed on the screen, but is returned as a result of the `` method
call.
If you the output from the executed program to be displayed, you can use
the
system method.

Stefano

On Aug 20, 2007, at 11:41 AM, Jeffrey B. wrote:

(Errno::ENOEXEC)
load “test.rb”
or
require “test.rb”
-------------------------------------------------------|
~ Ari
crap my sig won’t fit