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
···
____________________________________________________________________________________
Looking for a deal? Find great prices on flights and hotels with Yahoo! FareChase.
http://farechase.yahoo.com/
I think you need to make test.rb executable, which is what Errno::ENOEXEC is telling you.
Michael Glaesemann
grzm seespotcode net
···
On Aug 20, 2007, at 10:41 , Jeffrey Bowen wrote:
test1.rb
`test.rb`
test1.rb results => Exec format error - test.rb
(Errno::ENOEXEC)
load "test.rb"
or
require "test.rb"
-------------------------------------------------------|
~ Ari
crap my sig won't fit
···
On Aug 20, 2007, at 11:41 AM, Jeffrey Bowen wrote:
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)
Alle lunedì 20 agosto 2007, Michael Glaesemann ha scritto:
> 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 Glaesemann
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 10:41 , Jeffrey Bowen wrote: