[Note: parts of this message were removed to make it a legal post.]
On Mon, Nov 24, 2008 at 2:21 PM, Glen Holcomb <> wrote:
>
>
> On Mon, Nov 24, 2008 at 2:12 PM, Jayson Williams <
> > wrote:
>
>> I am using win os, so the shabang thing isn't an option for me. I put
>> the script in my ruby bin path, and I can access the script from
>> anywhere now, but I still have the same problem with the script not
>> running properly unless i type ruby first. It is as if ruby does not
>> attempt to read in arguments unless you explicitly pass the script
>> through ruby. If I call the script with the arguments without putting
>> 'ruby' first, the args don't seem to get read.
>>
>>
>> On Mon, Nov 24, 2008 at 2:05 PM, Diogo Lisboa <>
>> wrote:
>> > chmod a+x my_script (restrict permissions if you want)
>> > ./my_script args
>> >
>> > or put my_script in your PATH, and just type `my_script args'
>> >
>> > On Mon, Nov 24, 2008 at 4:47 PM, Jayson Williams
>> > <> wrote:
>> >> Hi All,
>> >>
>> >> I would like to do this -> my_script arg1, arg2
>> >> This doesn't seem to work when the script has arguments.
>> >>
>> >> But if I type -> ruby my_script arg1,arg2
>> >> It works fine.
>> >>
>> >> Is there a way I can run the my_script without typing ruby each time?
>> >> Thanks
>> >>
>> >>
>> >
>> >
>> >
>> > --
>> > Diogo
>> >
>> >
>>
>>
> Yep, in Windows you have to invoke ruby first on the command line. The
> shebang in the Unix world is kind of a short hand for doing this.
>
> --
> "Hey brother Christian with your high and mighty errand, Your actions speak
> so loud, I can't hear a word you're saying."
>
> -Greg Graffin (Bad Religion)
>
If you absolutely must get rid of the need to type ruby first you could use
rubyscript2exe to build a windows exe file out of your script.
--
"Hey brother Christian with your high and mighty errand, Your actions speak
so loud, I can't hear a word you're saying."
-Greg Graffin (Bad Religion)