From: Jayson Williams Date: 2008-11-29T03:57:03+09:00 Subject: Re: Can you run a command line script with arguments, without typing 'ruby' first? 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. On Tue, Nov 25, 2008 at 1:55 PM, Daniel Schömer wrote: > Jayson Williams wrote: >> On Tue, Nov 25, 2008 at 12:00 PM, Daniel Schömer wrote: >>> Jayson Williams wrote: >>>> The associations are correct. I reset them just to be sure though. I >>>> can execute the script without ruby, and it runs, but without ruby >>>> first, the args are not getting read. >>> Are command-line arguments included in the file association? >>> There should be something like "...\ruby.exe" "$*" or >>> "...\ruby.exe" "%1" "%2" "%3" "%4" "%5" (up to %9, this form is >>> restricted to 9 arguments). >> >> I don't believe these arguments are included in the association. I am >> not sure how to add them. > > I don't remember the exact menu/option names, but this should be > the way to check: > > - Windows Explorer, Menu 'Extras', 'Folder Options'. Or Control > Panel, 'Folder Options' > - Tab 'Filetypes' > - Scroll to '.rb' and select > - Button 'Advanced' or 'Extended' on the bottom right > - Now there should be a textfield containing '...\ruby.exe'. Try > to add "%*" or "%1" "%2" ... (try with and without quotes) > after ruby.exe > > (%1 gets replaced by the first argument, %2 by the second, > limited to 9 arguments. %* should be replaced by all arguments) > > Daniel > -- > http://xkcd.com/221 > >