Excluding gems in Textmate

Posted on January 18, 2010

I’ve been playing around with Rails 3 lately. Rails 3 uses Bundler which installs all your depending gems inside your app. This does not work very well with Textmate’s default behavior. Textmate will have to search through all gems each time you perform a “Find in project” (Command + Shift + F) or “Go to file” (Command + T) because the gems are inside your project. Due to the many files this is pretty slow, and makes it harder to find what you are looking for.

One simple way to solve this is, is to ask Textmate to exclude the vendor dir. You can do this in Preferences > Advanced. Here, just add ”|vendor” to “Folder pattern” and restart Textmate.

Textmate will now disregard the vendor directory entirely. Problem solved!

If you know a better way of doing this, please drop me a line :)

Ruby's ERB templating system - how does it work?

Posted on August 31, 2009

All Rails developers have used the ERB templating system. That is what enables us to mix html and ruby in our view files. But how does it actually work? I found out today, and thought I’d share my findings.