What to do with standard Ruby Shebang?

cssdev at mac.com cssdev at mac.com
Wed Sep 27 12:04:29 PDT 2006


On Sep 27, 2006, at 1:36 PM, Doug Hall wrote:

> Now that I've used MacPorts to install Ruby, what's the best way to  
> deal
> with the fact that the default shebang location is #!/usr/bin/env  
> ruby?
> (That's the standard, if you share files.) Should I create a  
> symbolic link
> there, back to /opt/local/bin? Will that do the trick?

You don't need to change anything in the scripts. They should work  
fine provided that your $PATH is set properly. /usr/bin/env searches  
the current $PATH for the argument. If you have /opt/local/bin/  
before /usr/bin, then it should properly evaluate to /opt/local/bin/ 
ruby. You can manually type it into your shell take make sure that  
the shebang evaluates correctly.

Chris



More information about the macports-users mailing list