There are two executables provided with the cygwin32 Ruby distribution:
is meant to be used at a command prompt (a DOS shell),
just as in the Unix version. For applications that read and write to
the standard input and output, this is fine.
But that also means that anytime you run
, you'll get a
DOS shell even if you don't want one---Windows will create a new
command prompt window and display it while Ruby is running. This
might not be appropriate behavior if, for example,
you double-click on a Ruby script that uses a graphical interface
(such as Tk), or if you are running a Ruby script as a background
task, or from inside another program.
In these cases, you'll want to use
. It is the same as
except that it does not provide standard in, standard
out, or standard error, and does not launch a DOS shell when run.
You can set a file association[Using
View/Options/Filetypes from Explorer.]
so that files with the extension ``
. By doing this, you can double-click
on Ruby scripts and they will simply run without popping up a DOS