Footnotes: Improving Rails / TextMate Synergy
As a Rails developer on OS X, I spent a lot of time bouncing back and forth between my web browser and the incredible editor TextMate. Often times, I will complete my latest modification to the source and I'll load it up in Firefox only to find an ambiguous page with the title "Action Controller: Exception Caught". Usually, a quick look through the stack trace reveals the line that is causing the problems. Then, it is back to TextMate to open the offending file, find the mistake and reload the web browser.
This can get tedious rather quickly. I have found that the Footnotes plugin for Rails does wonders and increases my productivity dramatically. It turns all of the lines in the stack trace into clickable [
-
]dHhtdDovLw==[
] links. TextMate registers itself with the OS X so that it receives all clicks of this type - a quick click on the stack trace will open the relevant file and place the cursor at the correct line. In addition, Footnotes adds some extremely useful debug information (and more TextMate links!) to the bottom of every view when the application is launched in the debug environment.
Footnotes is incredibly easy to install directly from within TextMate. To do it, just follow these instructions:
Open up your application as a TextMate project by issuing "[
CODE:-
]bWF0ZSAuIg==[
] from Terminal.app in the application's root. Then, open any file (I chose [
CODE:-
]YXBwbGljYXRpb24ucmI=[
] in the [
CODE:-
]YXBwL2NvbnRyb2xsZXJz[
] directory).
-
- Make sure that the editor has focus and then press Ctrl-| to bring up the Rails bundle's context menu. Select item #2 (Install plugin) from this menu.
- In the Plugin Search dialog that appears, type "Footnotes" and then press Go. This should bring up the Textmate Footnotes plugin as the only result. To install it, click the down arrow button on the right. If all is well, the Footnotes plugin should now be installed.
- Start up [
CODE:
-
]c2NyaXB0L3NlcnZlcg==[
] and see the pretty links!
-


