From: Gordon Hartley Date: 2002-07-21T14:02:52+09:00 Subject: Re: .rb files in WIndows Hi Hal, I don't know whether you're using cygwin / bash, but if you are, adding the following line to the start of the source file works: #!/cygdrive/c/ruby/bin/ruby -w (Adjust appropriately, the -w is optional). Unfortunately this is machine specific (but you could always write a script to add/change/remove the line). Cheers, Gordon On Sat, 13 Jul 2002 16:48:18 GMT, "Hal E. Fulton" wrote: >Here's a question for you. > >When you double-click on a >rb (or .rbw) file in Windows, >it associates it with Ruby and >runs it properly. Well and >good. (I think this trick is >accomplished by Andy's installer?) > >Now: How can I achieve this from >the command line? I.e., I want to >run foo.rb simply by typing its >name. (Yes, I spend a significant >amount of my Windows time at the >so-called DOS prompt.) > >I think there's a way. I think I >read about it once. But I can't >find it now. > >Thanks, >Hal Fulton