# Getting more descriptive ERB errors

**URL:** <https://www.ruby-forum.com/t/getting-more-descriptive-erb-errors/77540>\
**Category:** Ruby\
**Created:** [March 7, 2006, 12:16am UTC](https://www.ruby-forum.com/t/getting-more-descriptive-erb-errors/77540 "2006-03-07T00:16:23Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![lstrecv](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/l/e68b1a/32.png) [@lstrecv](https://www.ruby-forum.com/u/lstrecv)\
**Post date:** [March 7, 2006, 12:16am UTC](https://www.ruby-forum.com/t/getting-more-descriptive-erb-errors/77540/1 "2006-03-07T00:16:23Z")

</div>

I see that Rails provides very useful and descriptive ERB errors,  
showing exactly which part of the template caused the error.

Is there anyway I can get this behavior for general (non  
rails/ActionView) erb templates? I’m not opposed to requiring or  
mixing in certain chunks of rails (or even copying and pasting code) -  
just not sure how.

(Also, I know Rails has compilation and caching - anyway to do this?)
