Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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:

  • TextMate: 1.5.10
  • Rails: 3x (tried with 3.0.7, 3.1.rc1, 3.1.rc3)
  • RVM: 1.6.20
  • Ruby on Rails.tmbundle: HEAD

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.

like image 991
Meltemi Avatar asked Jun 13 '26 20:06

Meltemi


1 Answers

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.

like image 167
Amin Ariana Avatar answered Jun 18 '26 01:06

Amin Ariana



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!