After updating a couple of existing Rails app to 2.0, I found out some of TextMate sugar was out of date. Here’s 2 things I did to put the hot and sweet sugar back into TextMate.
Update the bundle
TextMate bundles are under heavy development all the time, get the latest version from their repo:
svn export http://macromates.com/svn/Bundles/trunk/Bundles/Ruby%20on%20Rails.tmbundle
Then double-click on the downloaded Ruby on Rails.tmbundle.
Fix the test commands
I’m a heavy user of Run (command+R), Run Focused Unit Test (shift+command+R) and the Rails menu (shift+ctrl+\) but that do not work with Rails 2 because of a conflict with the builder module.
Rob Sanheim explain how to solve this very easily, just rename the Builder.rb in the Rails bundle.
Hope this helps!









11 Comments
December 16, 2007 at 7:33 am
You can also put this at the top of your test_helper.rb file to solve the builder conflict:
$:.reject! { |path| path.include? ‘TextMate’ }
December 16, 2007 at 11:01 am
Right! Good to know, but don’t you prefer the permanent way?
December 16, 2007 at 12:07 pm
Love it!
I didn’t give Rails 2 a whirl yet, though… but I’ll be ready!
December 16, 2007 at 7:26 pm
I ws not aware the builder module was the problem with this.
December 17, 2007 at 10:14 am
Moving to Rails 2 at work as easier then I though, but it still took a couple of days.
thx for the comments all
December 25, 2007 at 2:51 pm
hi there I just installed texmate ti give it a try (coming from vim) and there is a bunch of things that dont seem to work with rails 2
-scaffold generators
-move to view (keeps searching .rhtml and now are erb)
and some other that cant remember right now!
does anyone know if there is a rails2 bundle coming soon?, my demo will expire before I can fully enjoy textmate I guess
I checked the svn and there seems to be _not_ a lo of movement
all this is weird since I think much of texmates´popularity is thanks to rails
December 26, 2007 at 12:04 am
hey jorge,
the cool thing w/ TextMate Rails support is it’s all Ruby and easy to customize.
I fixed mine in a sec by editing the Rails Bundle code in /Applications/TextMate.app/Contents/SharedSupport/Bundles/Ruby on Rails.tmbundle/Support/lib
thx for the comment.
January 2, 2008 at 11:03 am
What has changed in the bundle? Looking at the svn log doesn’t show much. I’m having all sorts of problem with migrations from textmate (can’t run them, remove/add column does not work). Are you experiencing any of these issues?
Maybe the update didn’t work.
January 2, 2008 at 12:23 pm
support for the new template filename format is there. Migrations are working for me, but the snippets do not use the “sexy migration” format.
What error do you get?
July 10, 2008 at 10:12 am
[...] There’s a little hiccup in sight, however. If you’re using Rails 2+, you have to apply a very small fix to TextMate before you’ll be able to run your tests. Read more about the fix on Marc-André Cournoyer’s blog. [...]
June 3, 2009 at 11:32 pm
Sweet blog. I never know what I am going to come across next. I think you should do more posting as you have some pretty intelligent stuff to say.
I’ll be watching you .