Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

shebang problem

Hey all,

as a shell i'm using Zsh (4.3.2) , but i'm using as script language Ruby (1.8.5) over Mac OS X the latest.

for ruby files i'm using this shebang :

#!/usr/bin/env ruby

then, if i do :

$ /opt/local/bin/ruby  my_script.rb <the args>

no prob at all because ruby takes control of the script

BUT if i do :

$ ./my_script.rb <the args>

zsh complains of syntax error because it attempt to read to ruby file, which, obviously, doesn't have the same syntax as the shell.

this morning was the first time i encountered such a prob.

someone running over a linux box (i don't know it's shell) said it's a known prob at least sicnce jul 2003.

does someone knows a workaround ?

the prob for me :

on my box i'm using a ruby installed under /opt (MacPort) and my users are using a default installed ruby under /usr

that's the reason for this shebang that way i was believing the shell would address the right ruby...

did you ear before about such a prob ?

a workaound ?


Messages sorted by: Reverse Date, Date, Thread, Author