Meltemi
Meltemi

Reputation: 38359

TextMate not working with current Ruby/Rails?

I'm trying, desperately, to get TextMate (via drnic's Ruby on Rails.tmbundle)to take me to Rails source when I highlight a term. Supposedly I can highlight a function and type control-f (^f) but when I do I just get a yellow sheet full of errors (below). Anyone know how to fix? and/or a better way to quickly get to source of a gem?

NOTE: Gem.latest_load_paths is deprecated with no replacement. It will be removed on or after 2011-10-01.
Gem.latest_load_paths called from /Users/meltemi/Library/Application Support/TextMate/Bundles/Ruby on Rails.tmbundle/Support/bin/jump_to_method_definition.rb.72.
NOTE: Gem.all_partials is deprecated with no replacement. It will be removed on or after 2011-10-01.
Gem.all_partials called from /Users/meltemi/.rvm/rubies/ruby-1.9.2-p180/lib/ruby/site_ruby/1.9.1/rubygems.rb:600.
    from /Users/meltemi/.rvm/rubies/ruby-1.9.2-p180/lib/ruby/site_ruby/1.9.1/rubygems.rb:423:in `each'
    from /Users/meltemi/.rvm/rubies/ruby-1.9.2-p180/lib/ruby/site_ruby/1.9.1/rubygems.rb:423:in `each'
    from /Users/meltemi/.rvm/rubies/ruby-1.9.2-p180/lib/ruby/site_ruby/1.9.1/rubygems.rb:587:in `each'
    from /Users/meltemi/.rvm/rubies/ruby-1.9.2-p180/lib/ruby/site_ruby/1.9.1/rubygems.rb:586:in `each'
    from /Users/meltemi/.rvm/rubies/ruby-1.9.2-p180/lib/ruby/site_ruby/1.9.1/rubygems.rb:586:in `each'
    from /Users/meltemi/.rvm/rubies/ruby-1.9.2-p180/lib/ruby/site_ruby/1.9.1/rubygems.rb/deprecate.rb:62:in `block (2 levels) in deprecate'
    from /Users/meltemi/Library/Application Support/TextMate/Bundles/Ruby on Rails.tmbundle/Support/bin/jump_to_method_definition.rb:72:in `find_in_gems'
    from /Users/meltemi/Library/Application Support/TextMate/Bundles/Ruby on Rails.tmbundle/Support/bin/jump_to_method_definition.rb:108:in `find_method'
    from /Users/meltemi/Library/Application Support/TextMate/Bundles/Ruby on Rails.tmbundle/Support/bin/jump_to_method_definition.rb:115:in `find'
    from /Users/meltemi/Library/Application Support/TextMate/Bundles/Ruby on Rails.tmbundle/Support/bin/jump_to_method_definition.rb:17:in `initialize'
    from /Users/meltemi/Library/Application Support/TextMate/Bundles/Ruby on Rails.tmbundle/Support/bin/jump_to_method_definition.rb:147:in `new'
    from /Users/meltemi/Library/Application Support/TextMate/Bundles/Ruby on Rails.tmbundle/Support/bin/jump_to_method_definition.rb:147:in `<main>'

Using:

It used to work with system Ruby (2.3.x). But when I set TextMate's TM_RUBY shell variable to: /Users/meltemi/.rvm/bin/rvm-auto-ruby in TextMate advanced prefs as per these instructions...things broke.

Upvotes: 3

Views: 479

Answers (2)

Amin Ariana
Amin Ariana

Reputation: 4805

I had the same problem and fixed it: You need to update the TextMate configured path at TM_RUBY to a ruby path in RVM that is compatible. For me:

.../.rvm/rubies/ruby-1.9.3-p327/bin/ruby

works as a compatible version of Ruby for TextMate, for example. You need to set it to an explicit package of Ruby in RVM, because otherwise you're letting it pick up RVM's default, which is likely further along than TextMate was tested against.

Do:

rvm list

to see what you have installed, then do:

which ruby

to see what the auto-ruby is picking up. Then pick something explicit instead of it that works.

Upvotes: 1

heartpunk
heartpunk

Reputation: 2275

I use gemedit or gem-open, whichever I think to install when I'm setting up a machine. They work quite well for this purpose, though I can see how it'd be nice to be able to get directly to the source in one click. Rubymine does this, too, but it's not free.

Upvotes: 0

Related Questions