From: Phrogz Date: 2010-01-28T14:20:08+09:00 Subject: Re: Installing Ruby Application On Jan 26, 9:03 am, Phillip Gawlowski wrote: > On 26.01.2010 16:40, Phrogz wrote: > > You don't even need it to have a .rb extension if you have a shebang > > line at the top. > > (Even works on Windows.) > > #!/usr/bin/env ruby -KU > > No, it doesn't. [snip[ > Ruby's installers register the .rb[w] extension with Windows, however. Ah, silly me, right you are. I was confused because I have an executable without a .rb extension and it 'just worked' when I installed the gem. I misattributed it to some shebang line magic somewhere. In fact, the rubygems install process creates a .bat file in the ruby bin directory with the name of your executable, and hence you can just type "mycommand" at a Windows prompt and it will work. The shebang line is still a good idea, but wholly unrelated to why you can create a 'binary' command without a .rb extension in a gem and have it work on Windows.