Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Environment resolution in shell scripts

edited May 2009 in FastScripts
I'm having trouble with the execution environment of ruby scripts through FastScripts.

Here's a quick test script:


#!/opt/local/bin/ruby
`echo \`/usr/bin/env ruby --version\` > ~/Desktop/out.txt`


When run from the command line the output file references my Macports installation of ruby:

ruby 1.8.7 (2009-04-08 patchlevel 160) [i686-darwin9]
When run through FastScripts I get the Leopard default interpreter:

ruby 1.8.6 (2008-08-11 patchlevel 287) [universal-darwin9.0]
Anyone know what's going on here? Hard-coding the path to the Macports ruby interpreter allows me to run the script through FastScripts, but I would prefer not to do so.

Thanks
Nick

Comments

  • Hi Nick - sorry about the delay in responding to this. It passed by me somehow.

    I don't really know what's going on here ... except that I think FastScripts probably loads before your Terminal-based paths are established. So to some extent you may be forced to be a little more literal with FastScripts than you are with your shell, where your preferences have had a chance to load.

    Daniel
Sign In or Register to comment.