Just downloaded the rspec plugin and when i try to run anything i get this error:
/tmp/temp_textmate.RAORye: line 9: /opt/local/bin/ruby: No such file or directory
At first i was receiving a similar error after i installed snow leopard and couldn't run ruby tests with cmd+r, i fixed it by editing my environment.plist to this:
/usr/local/bin:/usr/bin/ruby:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/X11/bin/Users/richardschneeman/bin/bin/:/usr/local/bin
When i run echo $PATH i get this:
#!/bin/sh echo "$PATH"/usr/local/bin:/usr/bin/ruby:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/X11/bin:/opt/local/bin:/Users/richardschneeman/bin/bin/:/usr/local/bin
I'm also getting a similar error running other bundles, so i believe it is with textmate configuration itself. From googling the only two documents I have been able to find only mention editing the path directly, or the environment.plist both of which show my correct ruby implementation:
which ruby /usr/bin/ruby
ahead in the list of /opt/local/bin/ so i don't understand why textmate would ever look there first. Either way additional troubleshooting tips will certainly be appreciated
Sounds like you may have set TM_RUBY probably in Preferences → Advanced.
On 1 Oct 2009, at 00:24, bob bob wrote:
Just downloaded the rspec plugin and when i try to run anything i get this error:
/tmp/temp_textmate.RAORye: line 9: /opt/local/bin/ruby: No such file or directory
At first i was receiving a similar error after i installed snow leopard and couldn't run ruby tests with cmd+r, i fixed it by editing my environment.plist to this:
/usr/local/bin:/usr/bin/ruby:/usr/bin:/bin:/usr/sbin:/sbin:/usr/ local/bin:/usr/X11/bin/Users/richardschneeman/bin/bin/:/usr/local/bin
When i run echo $PATH i get this:
#!/bin/sh echo "$PATH"/usr/local/bin:/usr/bin/ruby:/usr/bin:/bin:/usr/sbin:/sbin:/ usr/local/bin:/usr/X11/bin:/opt/local/bin:/Users/richardschneeman/ bin/bin/:/usr/local/bin
I'm also getting a similar error running other bundles, so i believe it is with textmate configuration itself. From googling the only two documents I have been able to find only mention editing the path directly, or the environment.plist both of which show my correct ruby implementation:
which ruby /usr/bin/ruby
ahead in the list of /opt/local/bin/ so i don't understand why textmate would ever look there first. Either way additional troubleshooting tips will certainly be appreciated
textmate mailing list textmate@lists.macromates.com http://lists.macromates.com/listinfo/textmate
Yep, thats exactly the case!! How can i set textmate to auto use my path variable instead, when i tried just deleting that variable, my tests no longer run.
On 3 Oct 2009, at 20:53, snowmaninthesun wrote:
Yep, thats exactly the case!! How can i set textmate to auto use my path variable instead, when i tried just deleting that variable, my tests no longer run.
Well… a process has a bunch of variables, these are inherited by each child process spawned.
PATH is one of these variables, and the “root” process will give it some sane value like: /bin:/sbin:/usr/bin:/usr/sbin — so all processes will inherit that, but each process is of course free to overwrite it.
You can overwrite it for the first process spawned when you login to your account via the ~/.MacOSX/environment.plist file. These values will thus be used by all successive processes spawned.
One process where PATH is used is the shell (bash) which normally is launched by Terminal, so by default bash would use the value you set in environment.plist but you can overwrite it in /etc/profile or any of the dozen other startup files that the shell execute.
Another process where PATH is used is TextMate, which again inherits from environment.plist but allows you to overwrite values via Preferences → Advanced. From TextMate you can run commands via a shell interpreter, so here PATH can again be overwritten by /etc/ profile and similar, but far from all commands go via a shell interpreter.
In light of that, the question of “how to auto-set PATH” makes less sense. I think what you maybe wanted to ask “how to only set PATH once?”. In that case, the most appropriate would be environment.plist, but you have to make sure that no shell startup file overwrites the variable (the default /etc/profile used to do that, but I don’t think it does anymore). The tedious thing about environment.plist though is that for the changes to be effective, the root process needs to be relaunched (that is, you need to logout of your account and login again).