From: David Mitchell Date: 2005-05-30T08:16:00+09:00 Subject: Re: How to find ruby? I do this: #!/usr/bin/env ruby For an explanation of why this works, check: man env David Mark Probert wrote: > Hi .. > > I am not sure of the best way of going about finding the location of Ruby for > a shebang line (*nix execution). > > My scripts don't always have control of where Ruby might be installed (that is > the provenance of the destination organization's sysadmin). Some examples > that I have run across include > > /usr/local/bin/ruby > /usr/bin/ruby > /opt/ruby1.8/bin/ruby > etc. > > So, what do other people normally do when they have this kind of situation > when it comes to the shebang line? I'd rather do it in some generic manner > rather than have a substitution script run at install time (though that is an > option). > > Thanks, > -- David Mitchell Software Engineer Telogis NOTICE: This message (including any attachments) contains CONFIDENTIAL INFORMATION intended for a specific individual and purpose, and is protected by law. If you are not the intended recipient, you should delete this message and are hereby notified that any disclosure, copying, or distribution of this message, or the taking of any action based on it, is strictly prohibited.