[TxMt] Re: Textmate not working with RVM despite PATH variables

Allan Odgaard mailinglist at textmate.org
Mon Dec 6 21:51:00 UTC 2010


On 6 Dec 2010, at 21:42, Patrick Minton wrote:

> […] I still get "env: ruby: No such file or directory" from Textmate.

This indicates you messed up your PATH (or deleted /usr/bin/ruby).

> […] My shell variables in Textmate:
> 
> TM_RUBY    /Users/patrick/.rvm/bin/textmate_ruby
> PATH       /usr/bin:/bin:/usr/sbin:/sbin

Try uncheck PATH, although it does contain /usr/bin… did you delete ruby? Can you try ‘/usr/bin/ruby -v’ in Terminal?

> […] I am curious why TextMate is using env at all given that TM_RUBY is set...

TM_RUBY is ONLY for user scripts¹. The error you get is TextMate’s bundled commands which use the ruby in your PATH, it can’t use TM_RUBY because not all our commands have the required encoding boilerplate to satisfy ruby 1.9’s encoding madness.

We could replace all the ‘env ruby’ calls to /usr/bin/ruby, because that is really what we want, but a) some bundles are actually used on other platforms where ruby might not be in /usr/bin and b) historically we have supported earlier versions of OS X that only had ruby 1.6 *iff* the user installed ruby 1.8 and updated PATH so TM commands would find it.


¹ Although it wasn’t until recently we actually removed TM_RUBY from most bundles.



More information about the textmate mailing list