From: Jayson Williams Date: 2008-11-30T14:26:25+09:00 Subject: Re: Can you run a command line script with arguments, without typing 'ruby' first? Mohit, YOU ROCK ! I am embarrassed to have been goofing with computers for so many years without knowing these basics. Anyway everything is working the way I want, and I have learned some very useful basics. Thanks! Jayson On Sat, Nov 29, 2008 at 3:09 AM, Mohit Sindhwani wrote: > 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. > > > >