Hello,

I have a problem with the way TextMate fills the Ruby $LOAD_PATH variable. I have two versions of Ruby on my computer : the version OS X ships with (1.8.2) and the version I installed myself (1.8.6).

I created a new test command with the following script :

        /usr/bin/env ruby -w

When I trigger my command I get ruby 1.8.6, so it's fine.

Then I created a new command with :

        #!/usr/bin/env ruby
        require "rbconfig"
        puts $LOAD_PATH
        puts Config::CONFIG['TEENY']

When I use it I get:

        /usr/lib/ruby/site_ruby/1.8
        /usr/lib/ruby/site_ruby/1.8/powerpc-darwin8.0
        /usr/lib/ruby/site_ruby/1.8/universal-darwin8.0
        /usr/lib/ruby/site_ruby
        /usr/lib/ruby/1.8
        /usr/lib/ruby/1.8/powerpc-darwin8.0
        /usr/lib/ruby/1.8/universal-darwin8.0
        .
        2

So the command is using the latest version of ruby but fill the $LOAD_PATH with paths from the former version.

Moreover, /usr/lib/ruby/site_ruby/1.8/powerpc-darwin8.0 does not exist on my computer so it makes the Completion: require strings Preference Item to abort since it tries a Dir.new() on that path.

I managed to fix the completion command by replacing #!/usr/bin/env ruby with #!/usr/local/bin/ruby which is the actual path to the latest version of the ruby interpreter.

Thanks,
Sylvain

_______________________________________________
textmate-dev mailing list
[email protected]
http://lists.macromates.com/mailman/listinfo/textmate-dev

Reply via email to