Hey all,
I've carefully read the TextMate manual 8.2 search PATH
actually my ~/.profile, ~/.MacOS/environment.plist have the same value than the shell i'm using (zsh).
in fact i've writen two ruby scripts to update these files according to zsh setup.
then, my PATH hits first /opt/local/bin where is theMacPort Ruby.
when i use a ruby file with the following shebang :
#! /usr/bin/env ruby -wx
from TextMate i get :
/usr/bin/ruby: No such file to load -- ubygems (LoadError)
from terminal :
$ ./myscript.rb
it works as expected.
I think i've miss something to set env vars for TextMate...
but what ???
Yvon
I've had the problem before. But when I restarted TextMate the problem went away. very weird.
scott. On Dec 1, 2006, at 6:26 AM, Une Bévue wrote:
Hey all,
I've carefully read the TextMate manual 8.2 search PATH
actually my ~/.profile, ~/.MacOS/environment.plist have the same value than the shell i'm using (zsh).
in fact i've writen two ruby scripts to update these files according to zsh setup.
then, my PATH hits first /opt/local/bin where is theMacPort Ruby.
when i use a ruby file with the following shebang :
#! /usr/bin/env ruby -wx
from TextMate i get :
/usr/bin/ruby: No such file to load -- ubygems (LoadError)
from terminal :
$ ./myscript.rb
it works as expected.
I think i've miss something to set env vars for TextMate...
but what ???
Yvon
For new threads USE THIS: textmate@lists.macromates.com (threading gets destroyed and the universe will collapse if you don't) http://lists.macromates.com/mailman/listinfo/textmate
Selon Scott Walter sw-ng@scottwalter.com:
I've had the problem before. But when I restarted TextMate the problem went away. very weird.
Thanks for your reply, it doesn't work in my case, it seems TextMate wants to use the default Apple's Ruby install (buggy) where i use /opt/local/bin/ruby...
Is their a way to change the PATH for TextMate ?
my own PATH (under Zsh) hits /opt/local/bin BEFORE /usr/bin...
best,
Yvon
On Dec 6, 2006, at 2:12 AM, yt.mac@free.fr wrote:
Is their a way to change the PATH for TextMate ?
Sure is. Read the "Important" paragraph found at:
http://macromates.com/textmate/manual/shell_commands#search_path
James Edward Gray II
On 12/6/06, James Edward Gray II james@grayproductions.net wrote:
On Dec 6, 2006, at 2:12 AM, yt.mac@free.fr wrote:
Is their a way to change the PATH for TextMate ?
Sure is. Read the "Important" paragraph found at:
http://macromates.com/textmate/manual/shell_commands#search_path
this does bring up an issue that i think is a source of confusion - shells and variables set in user rc files. i wonder if it would be possible to tweak the initialization code to handle additional shells based on $SHELL or niutil -readprop / /users/$USER shell
perhaps it could simulate a login shell (of the user's default) and export the environment to be sucked back into bash_init.sh?
i know i have discussed this on IRC a few times and it has been said that apple needs a strategy to provide this, but i really don't understand the technical limitations that would render this task *impossible*. can anyone outline the issues at play or possibly the work that would be necessary to support this?
cheers, jean-pierre
On 7. Dec 2006, at 20:42, jeanpierre@gmail.com wrote:
[...] i wonder if it would be possible to tweak the initialization code to handle additional shells based on $SHELL or niutil -readprop / /users/$USER shell
perhaps it could simulate a login shell (of the user's default) and export the environment to be sucked back into bash_init.sh?
i know i have discussed this on IRC a few times and it has been said that apple needs a strategy to provide this, but i really don't understand the technical limitations that would render this task *impossible*. can anyone outline the issues at play or possibly the work that would be necessary to support this?
To pull this off, you basically need to write a script for every existing shell (they have various subtleties in their command language) which dumps the environment in some parse-able form.
Then you need to launch their shell interpreter with this script, and the proper options to get it to first source the proper init resource files, so that it has the environment set up, as in an interactive login shell.
This is:
a) a tedious task (figuring out all this for the various shells), b) would add some overhead to every single operation in TM that needs to have the environment, c) very fragile, as the user could do all sorts of unexpected stuff in his init files.
So b and c is already a problem now (and I’ve had to do ‘support’ related to it more times than I can count), and I will remove the current sourcing of init files for 2.0 (and instead make a better preference system for setting up the PATH with some heuristics/ smartness to make this sort of work out of the box for typical setups).
On 2 déc. 06, at 08:09, Michael Sheets wrote:
ubygems? um? rubygems you mean? ;)
No, 'ubygems' is correct, it's a special module named that way to allow you to write this from the command line:
ruby -rubygems ...
instead of
ruby -rrubygems ...
Selon Michael Sheets mummer@whitefalls.org:
On Dec 1, 2006, at 6:26 AM, Une B�vue wrote:
/usr/bin/ruby: No such file to load -- ubygems (LoadError)
ubygems? um? rubygems you mean? ;)
NO? NO, it's the message i get not what i've setup :
export RUBYOPT=rubygems
...
Yvon