R
Ronald Fischer
Ruby 1.8.6 after installation has associated the file extension .rb
within Windows to Ruby. Hence I can call a Ruby program directly
from the Windows command line:
ruby t2.rb
t2.rb
t2
all work the same.
This does not work, however, if the program is executed from
within Ruby itself. Example:
Assuming I have a file t2.rb containing only the line
puts "hello"
and another file containing x.rb containing only the line
%x(t2.rb)
When I execute on the Windows command line
x.rb
I get the error message:
H:/tmp/x.rb:1:in ``': Exec format error - t2.rb (Errno::ENOEXEC)
from H:/tmp/x.rb:1
Is this a bug or intended behaviour?
Changing x.rb to
%x(ruby t2.rb)
works well.=20
--=20
Ronald Fischer <[email protected]>
Phone: +49-89-452133-162
=20
within Windows to Ruby. Hence I can call a Ruby program directly
from the Windows command line:
ruby t2.rb
t2.rb
t2
all work the same.
This does not work, however, if the program is executed from
within Ruby itself. Example:
Assuming I have a file t2.rb containing only the line
puts "hello"
and another file containing x.rb containing only the line
%x(t2.rb)
When I execute on the Windows command line
x.rb
I get the error message:
H:/tmp/x.rb:1:in ``': Exec format error - t2.rb (Errno::ENOEXEC)
from H:/tmp/x.rb:1
Is this a bug or intended behaviour?
Changing x.rb to
%x(ruby t2.rb)
works well.=20
--=20
Ronald Fischer <[email protected]>
Phone: +49-89-452133-162
=20