Hi all,
A quick search of both Google and this lists' archive didn't solve this for me so I am wondering if anyone here has an idea.
I use RVM and Textmate. I followed the instructions at:
http://rvm.beginrescueend.com/integration/textmate/
(including moving the builder.rb in /Applications/TextMate.app/Contents/SharedSupport/Support/lib/)
However, I still get "env: ruby: No such file or directory" from Textmate. Using env from the command line works fine:
mbpatrick:~ patrick$ /usr/bin/env ruby -v ruby 1.8.6 (2010-02-05 patchlevel 399) [i686-darwin10.4.0] mbpatrick:~ patrick$ sudo ln -s /usr/bin/env /usr/local/bin/env Password: mbpatrick:~ patrick$ /usr/local/bin/env ruby -v ruby 1.8.6 (2010-02-05 patchlevel 399) [i686-darwin10.4.0]
And my textmate_ruby script works fine:
mbpatrick:~ patrick$ /Users/patrick/.rvm/bin/textmate_ruby -v ruby 1.8.6 (2010-02-05 patchlevel 399) [i686-darwin10.4.0] mbpatrick:~ patrick$
My shell variables in Textmate:
TM_RUBY /Users/patrick/.rvm/bin/textmate_ruby PATH /usr/bin:/bin:/usr/sbin:/sbin
I've quit Textmate and restarted, quit shells and restarted, I've tried putting /Users/patrick/.rvm/bin in my PATH (in TextMate), I've tried putting /Users/patrick/.rvm/rubies/ruby-1.8.6-p399/bin/ in my PATH (in Textmate), I updated Textmate and all it's bundles to the newest versions, nothing seems to work.
I am curious why TextMate is using env at all given that TM_RUBY is set...
Anyone have any ideas? Would appreciate any help.
Patrick
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.