Automatically checking erb files for errors
(Posted by ulysses)
A bunch of errors occur because of bad template code. Although you can debug these by switching between your browser and IDE, it�??s easier if you can view the problems in your IDE.
An quick way to do this is to add this script to your path:
#!/bin/sh
/usr/bin/erb -x $1 | ruby -c
Configuring your IDE to run this script is highly dependent on which IDE you use. It should be pretty easy however, and any editor worth its bits should support running it with a quick key combo.