Disclaimer: I've been playing with TM for about 30 minutes, i.e. I'm a complete newcomer. One of the main reasons I'm considering abandoning my beloved emacs in favor of TM is the integrated ri / documentation lookup. But I haven't been able to get that to work.
Briefly, my question is: how can I get the TM help system to use ruby / rails documentation from a sandboxed directory?
Some details:
In my development machine I have carefully built versions of ruby 1.9.1, rails, ri, rdoc, all of my gems, etc in a sandboxed directory (~/Development/Ruby/bin/*), and I've left the Mac OS X standard distributions alone.
If I try to use TM's ^h help lookup, I get a message like:
/Applications/TextMate.app/Contents/SharedSupport/Bundles/ Ruby.tmbundle/Support/bin/linked_ri.rb:13: command not found: ri -T -f plain belongs_to
... presumably since it can't find 'ri'. Digging in, I can ask TM to tell me more about its environment:
which ri^r => /opt/local/bin/ri
ls -l /opt/local/bin/ri^r => -rwxr-xr-x 2 root admin 1491 Aug 5 2009 /opt/local/bin/ri
echo $PATH^r => /Applications/TextMate.app/Contents/SharedSupport/Support/bin/ CocoaDialog.app/Contents/MacOS:/usr/local/git/bin:/opt/local/bin:/opt/ local/sbin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/X11/bin:/ Applications/TextMate.app/Contents/SharedSupport/Support/bin
(Another disclaimer: I'm also new to ri / rdoc, so this may ultimately be an ri / rdoc question rather than a TM question.)
- rdp