From: Mohit Sindhwani Date: 2008-11-29T17:09:12+09:00 Subject: Re: Can you run a command line script with arguments, without typing 'ruby' first? Jayson Williams wrote: > Frustratingly, I got this working fine at work. I can type > my_script args > and I get the proper results. Now my propblem is my home pc. I have > tried all the fixes above, but I still have to type > > my_script.rb args > unless I inclued the .rb extension, the script will not run. > In general, you should need to type in the extension as part of the program name cos the extension is what tells Windows what to do with it. The exception is a list of extensions that Windows treats as executables. These are usually .exe, .com, . bat, .cmd etc - in these cases, typing the extension is optional. This is controlled in a variable called PATHEXT in the environment. In a command window, I did: command>set This gives me a list of extensions that are already there: PATHEXT=.COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH;.RB;.RBW (note .rb and .rbw at the end) Add that to your PATHEXT and try? Cheers, Mohit. 11/29/2008 | 4:13 PM.