From: Ryan Raaum Date: 2006-07-22T10:20:07+09:00 Subject: Re: Mac OSX Ruby Configuration Question On Saturday, July 22, 2006, at 9:20 AM, Dave Howell wrote: > >On Jul 21, 2006, at 14:12, Ryan Raaum wrote: > >>> And look, here's a more-reliable OSX-specific solution dropped in my >>> lap. > >Too bad it didn't actually work. > >What I want to be able to do is auto-path to ruby, by having shell >scripts start with > > #!/usr/bin/env ruby > >This works beautifully from the command line, but gives me 1.6.8 ruby >when I call the script from TextWrangler. > >I modified my environment.plist to contain the following: > > PATH > /Library/Ruby/Bin:$PATH You're going about it backwards. If you have PATH in your environment.plist file, then it is the ultimate source for your path - so you should put in a fully qualified set of default paths, something like PATH /Library/Ruby/bin:/bin:/sbin:/usr/bin:/usr/sbin and then if you modify your PATH in .bash_profile (or wherever) like so export PATH=/monkey/bin:$PATH then you will end up with an ultimate path of /monkey/bin:/Library/Ruby/bin:/bin:/sbin:/usr/bin:/usr/sbin at the end of the day -r > >So what did I get for a path? > > "/Library/Ruby/Bin:$PATH" > >No variable expansion. Sigh. I assigned BASH_ENV the value >"/etc/profile", which is good for other things, but doesn't help this >case, because unless I specify /bin/bash, it uses an implicit /bin/sh, >which has no mechanism for specifying profiles when run >non-interactively. > >So I'm back to #!/Library/ruby/bin/ruby for now, and scheming to throw >old ruby out of /usr/bin so new ruby can sit there instead the next >time this comes up. Alas. > > -- Posted with http://DevLists.com. Sign up and save your mailbox.