[TxMt] TextMate and Ruby version

Florian Gilcher flo at andersground.net
Sat Apr 7 11:30:36 UTC 2007


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi,

My .bash_login reads (no .bash_profile or .profile in ~):

export
PATH="/usr/local/bin:/usr/local/sbin:/opt/local/bin:/usr/local/mysql/bin:$PATH"


# Setting PATH for MacPython 2.5
# The orginal version is saved in .bash_login.pysave
PATH="/Library/Frameworks/Python.framework/Versions/Current/bin:${PATH}"
export PATH

which should lead to using /usr/local/bin/ruby , my ruby 1.8.4
installation. To make the problem more exciting, the command uses the
shebang line:

#!/usr/bin/env ruby

This one points to ruby 1.8.4, too:

Nostalgia-For-Infinity:~ skade$ /usr/bin/env ruby -v
ruby 1.8.4 (2005-12-24) [i686-darwin8.6.1]

Digging further, i modified the command 'Validate Syntax':

#!/usr/bin/env ruby
require ENV['TM_SUPPORT_PATH'] + '/lib/textmate'
puts "using ruby-" + RUBY_VERSION.to_s
result = `"${TM_RUBY:=ruby}" -wc 2>&1`
puts result
TextMate.go_to :line => $1 if result =~ /-:(\d+):/

And changed `"${TM_RUBY:=ruby}" -wc 2>&1` to `"${TM_RUBY:=ruby}" -v´.
Running the Command now yields:

using ruby-1.8.2
ruby 1.8.4 (2005-12-24) [i686-darwin8.6.1]

Perhaps i missed something, but i do feel like it doesn't honor the PATH
correctly.

On the other hand: version is edge with newest bundles - nothing is perfect.

Meilleures salutations
Florian

Allan Odgaard wrote:
> On 7. Apr 2007, at 11:41, Florian Gilcher wrote:
> 
>> [...]
>> But I do have some other strange behaviour regarding ruby versions,
>> hinting that there is something wrong with Textmates handling of ruby
>> versions.
> 
> It does not consistently use TM_RUBY, as it can’t e.g. use it in shebang
> lines
> 
> If you need it to use a custom installed version the only proper way is
> really to setup your PATH to point at the custom version before the
> standard version:
> http://macromates.com/textmate/manual/shell_commands#search_path
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.3 (Darwin)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFGF4Db8RlGMqQ8m7oRAoaqAKCgKLoJSRnAmaIwJ1SnZynP7TlEcACfQLSo
LGLjrXxdTxTuuGCfZsTSqcQ=
=5ETP
-----END PGP SIGNATURE-----



More information about the textmate mailing list