Footnotes Plugin - Integrate TextMate with Ruby on Rails

I just stumbled across this great little plugin called Footnotes made by Duane Johnson.

Basicly what it does is enhance the standard error page to include links in the different traces which when clicked will take you straight back to TextMate for easier debugging. Nifty.

You also get a series of links at the bottom of a successfully rendered page whereby you can easily see session, cookies and the log for instance or jump straight to the view or controller file.

Footnotes is hosted at TextMate’s home MacroMates.com and is installable the usual way by:

./script/plugin install http://macromates.com/svn/Bundles/trunk/Bundles/Rails.tmbundle/Support/plugins/footnotes/

or if you want to check it out without adding it to your repository:

cd vendor/plugins
svn export http://macromates.com/svn/Bundles/trunk/Bundles/Rails.tmbundle/Support/plugins/footnotes/

Restart your server and enjoy.

I found it lacking a bit in the CSS department so you might want to tweak the plugins insert_styles method in the textmate_footnotes.rb file if you find the links unreadable.

Personally I tweaked it to:

<style type="text/css">
  #tm_footnotes_debug {background-color: #000; padding-top: 5px; margin-top: 0.5em; text-align: center; color: #999;}
  #tm_footnotes_debug * {color: #CCC;}
  #tm_footnotes_debug a {text-decoration: none; color: #bbb;}
  #tm_footnotes_debug pre {overflow: scroll;}
   fieldset.tm_footnotes_debug_info {text-align: left; border: 1px dashed #aaa; padding: 1em; margin: 1em 2em 1em 2em; color: #777;}
</style>

2007/04/22 at 18:46

Separate_einz_small