[TxMt] Screwed up my ruby integration - help!

Gavin Kistner gavin at refinery.com
Sat Sep 10 14:53:37 UTC 2005


Hey, I somehow hosed TextMate's ability to perform the Run Ruby  
command, and I don't know how I did it, or how to fix. (Or rather, I  
know how I did it, but I don't understand why it broke.)

Symptom 1: invoking Run Ruby command produces
"/usr/local/bin/ruby: No such file or directory -- /Users/ 
gavinkistner/Library/Application Support/TextMate/Bundles/ 
Ruby.tmbundle/Supprt/tmruby.rb (LoadError)"

Symptom 2: selecting text and invoking the Lookup Ruby Docs command  
produces
/bin/bash: /usr/bin/ri: /usr/bin/ruby: bad interpreter: No such file  
or directory

What I did:
1) Despite having /usr/local/bin first in my path[1], TextMate was  
using /usr/bin/ruby instead of /usr/local/bin/ruby
So I used TextMate's preferences and set the TM_RUBY variable  
explicitly to /usr/local/bin/ruby
To be sure, I also moved /usr/bin/ruby to /usr/bin/ruby_apple

2) I was tired of seeing warnings in my ruby output, so I changed the  
Ruby Ruby command from:
${TM_RUBY:=ruby} -w -- "$TM_BUNDLE_PATH/Supprt/tmruby.rb" "$TM_FILEPATH"
to
${TM_RUBY:=ruby} -- "$TM_BUNDLE_PATH/Supprt/tmruby.rb" "$TM_FILEPATH"

...and it broke, complaining about lack of tmruby.rb. (Spotlight  
confirms that no such file exists on my drive.)

3) I then put the -w back in, and it's STILL broken!

...what happened to tmruby.rb? If I remove that bit and change the  
command to just
${TM_RUBY:=ruby} "$TM_FILEPATH"
I can get ruby code to execute, but I don't get the nice output in  
the HTML window :|



[1] Output of terminal session, which defaults to tcsh:
[Slim:~] gavinkis% setenv
PATH=/usr/local/bin:/usr/local/sbin:/bin:/sbin:/usr/bin:/usr/sbin:.
...extra variables omitted...
[Slim:~] gavinkis% bash
Slim:~ gavinkistner$ echo $PATH
/usr/local/bin:/usr/local/sbin:/bin:/sbin:/usr/bin:/usr/sbin:.





More information about the textmate mailing list