On 3/19/08, James Gray james@grayproductions.net wrote:
On Mar 19, 2008, at 10:05 AM, Rick DeNatale wrote:
I've got both a personal MacBook, and a work MacBook pro, each with licensed copies of TextMate.
It probably doesn't help now, but just FYI the TextMate license is attached to you the user (not the machine). Thus, you are allowed to use it on multiple machines.
Normal .rb files are coming up as Ruby rather than Ruby on Rails.
Just open a .rb file and switch the language menu at the bottom of the window to Ruby on Rails. TextMate needs the hint to know you want to use the Rails grammar, but after you tell it once it will remember.
I know, but the problem is that when you make a manual association, then any file ending in .rb will be treated that way, overriding anything in the language definitions in bundles.
The RSpec bundle has a language file which recognizes files ending in _spec.rb as being rspec(ruby) files. Alan's article describes how to set things up so that this works by giving the Language specification in the Ruby on Rails bundle preference over the just plain Ruby language.
Yes it means that if I'm editing a ruby file which isn't part of a rails app, I get some stuff which I don't really need, but I can live with that until Textmate supports somewhat smarter language detection which might take the project and maybe even the file path into account.
And as I said, I did find the fileType in the Ruby language in the Ruby Bundle, so it's all working the same way on both machines.