Hi Christopher:

On 2010Jun05, at 06:10, Christopher Creutzig wrote:

On 6/5/10 3:55 AM, Robert Poor wrote:

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.

Try adding that directory (probably better with its real name, i.e.,
not using the tilde, but /Users/whatever/Development/Ruby/bin/) to your
PATH variable inside TextMate's Preferences/Advanced/Shell Variables
tab, in front of whatever you already have. If there is no entry yet,
use whatever “echo $PATH” says inside a terminal session where your ri command works.

I had already tried setting PATH, but it doesn't work either -- I think I see why.  The known "good" $PATH is:

Users/r/Development/Ruby/bin:/Users/r/Development/Rails/bin:/usr/local/mysql/bin:/opt/local/bin:/opt/local/sbin:/usr/bin:/bin:/usr/sbin:/sbin:~/bin:/usr/local/bin:/usr/X11R6/bin

After I set PATH in the preferences/advanced/shell variables to the above string, TM shows that it has prepended some of its own directories to the PATH variable:

echo $PATH^r
/Applications/TextMate.app/Contents/SharedSupport/Support/bin/CocoaDialog.app/Contents/MacOS:/usr/local/git/bin:/opt/local/bin:/opt/local/sbin:/Users/r/Development/Ruby/bin:/Users/r/Development/Rails/bin:/usr/local/mysql/bin:/opt/local/bin:/opt/local/sbin:/usr/bin:/bin:/usr/sbin:/sbin:~/bin:/usr/local/bin:/usr/X11R6/bin:/usr/X11/bin:/Applications/TextMate.app/Contents/SharedSupport/Support/bin

I can see why -- TextMate needs to keep some of its special directories in the path.  But since /opt/local/sbin now appears BEFORE /Users/r/Development/Ruby/bin, it is (I believe) finding the wrong ri.  When I try ^h on a function name, I get:

/Applications/TextMate.app/Contents/SharedSupport/Support/lib/web_preview.rb:101: warning: mismatched indentations at 'end' with 'if' at 98
ri Command Error.

... and I don't see a way to get /Users/r/Development/Ruby/bin *before* the TextMate-imposed /usr/local/sbin.  (I suppose I could create relevant links /usr/local/sbin, but that would defeat the purpose of building the sandbox in the first place -- I want my own configuration, and I don't want to mess with the Apple-supplied standard version.)

Suggestions?

On 2010Jun05, at 06:10, Christopher Creutzig wrote:

On 6/5/10 3:55 AM, Robert Poor wrote:

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.

Try adding that directory (probably better with its real name, i.e.,
not using the tilde, but /Users/whatever/Development/Ruby/bin/) to your
PATH variable inside TextMate's Preferences/Advanced/Shell Variables
tab, in front of whatever you already have. If there is no entry yet,
use whatever “echo $PATH” says inside a terminal session where your ri
command works.

echo $PATH^r =>
/Applications/TextMate.app/Contents/SharedSupport/Support/bin/
CocoaDialog.app/Contents/MacOS:/usr/local/git/bin:/opt/local/bin:/opt/

Right. Don't forget to include the directories including
/Applications/TextMate.app/ into whatever new PATH definition you set.



HTH,
Christopher

_______________________________________________
textmate mailing list
textmate@lists.macromates.com
http://lists.macromates.com/listinfo/textmate

--:
Robert Poor
p: +1 617 818 5115
--:
This message and the information it contains are the proprietary and confidential property of NBT Ventures and may be privileged. If you are not the intended recipient, please do not read, copy, disclose or distribute its contents to any party, and notify the sender immediately.
--: