Christian Luginbuehl
5/12/2007 1:28:00 PM
> that is all fine, but my question is: where do you type that command
> line?
First of all, let me say that the following terms you might find in
tutorials or books all mean basically the same: Command line, Command
Prompt, DOS Prompt, Terminal, Shell, Console and probably a few more.
Another thing: If you installed from the One-Click-Installer you also
should have the file extension .rb been associated with the ruby
interpreter. This means if you double-click of a file (let's say
'test.rb') it will automatically open a Command Prompt and run ruby on
your file (with the command 'ruby test.rb') in the directory it is
saved. If your Command Prompt opens and directly closes and you can't
see the output of your program this means that your program has
terminated and therefore the Command Prompt was closed. To avoid that
you can tell somewhere (I can't remember where - I'm running Linux here)
to let you close the window manually or simply put a 'gets' at the end
of your source file ('test.rb'). This is a method that asks for user
input via the keyboard and therefore your program won't close until you
hit the <Return> key.
Cheers,
Christian Luginbuehl