I agree with  Jesús Gabriel y Galán :

the ruby command will only work if you put the "$path\ruby\bin"  in your 
PATH
-> right click on computer, then properties, advanced, environment 
variables, edit your PATH variable and add you ruby path ex : 
c:\ruby\bin;.....
dont delete or modify existing path ^^

it's may be usefull if you want see ruby errors


If you only type the filename like calc.rb, windows will try to run the 
file with the assiociated program in your case, ruby, so it will work 
fine, but if you will get an error, the cmd window will be close with 
your ruby application.

If you only run calc, without the ".rb" windows will try ton run 
runnable file with calc name ... That could be a problem if for example 
you use ocra to get a ruby exe (named calc.exe) and you still have your 
calc.rb in the same folder.

I dont know how windows will react ... it may ask you if you want run 
the .exe or the .rb, or send you an error, or maybe run the .exe ..
-- 
Posted via http://www.ruby-forum.com/.