[TxMt] intermittent ruby problems

Ryan King ryan at theryanking.com
Tue Jun 13 21:00:27 UTC 2006


On Jun 12, 2006, at 2:03 PM, Allan Odgaard wrote:
> On 12/6/2006, at 22:50, Ryan King wrote:
>
>> This bring up a question, though. In Textmate, I'd set  PATH  = "/ 
>> usr/local/bin:/usr/bin" (via Preferences -> advanced -> shell  
>> variables).
>>
>> Shouldn't this take precedence?
>
> For shebang scripts, yes.
>
> I tried setting PATH myself in advanced preferences and then did ^R  
> with these two lines selected:
>
>    #!/bin/sh
>    echo "$PATH"
>
> This did show the changed path. So not sure why it would fail to  
> work for you.

Yeah, I'm not sure either, but here's the result of running some  
scripts with ^r

#!/bin/sh

echo $PATH

result:
/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin



#!/usr/bin/env ruby

puts 'foo'

result:
env: ruby: No such file or directory


#!/bin/sh

which ruby

result:
/usr/local/bin/ruby


As you can see, which can find ruby, but env can't. I have no idea why.

-ryan




More information about the textmate mailing list