Stefano Crocco
8/20/2007 3:57:00 PM
Alle lunedì 20 agosto 2007, Michael Glaesemann ha scritto:
> On Aug 20, 2007, at 10:41 , Jeffrey Bowen 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 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