# Stack traces when using render

**URL:** <https://discuss.rubyonrails.org/t/stack-traces-when-using-render/68291>\
**Category:** rubyonrails-talk\
**Created:** [December 25, 2013, 2:09am UTC](https://discuss.rubyonrails.org/t/stack-traces-when-using-render/68291 "2013-12-25T02:09:00Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Ulysse\_Carion](https://avatars.discourse-cdn.com/v4/letter/u/b5e925/32.png) [@Ulysse\_Carion](https://discuss.rubyonrails.org/u/Ulysse_Carion)\
**Post date:** [December 25, 2013, 2:09am UTC](https://discuss.rubyonrails.org/t/stack-traces-when-using-render/68291/1 "2013-12-25T02:09:00Z")

</div>

Hi all,

I recently spent an interesting hour trying to figure out why a particular render wasn’t working. I was getting the error message:

syntax error, unexpected ‘)’, expecting ‘=’

The line that was “failing” (that is, the very first line in the stack trace produced) looked like this:

\<%= render student %\>

The error, of course, wasn’t there; it was in the partial that “student” corresponded to (the layout “/users/\_user.html.erb”). Once I realized this, it took all of three seconds to find a typo I had made.

I think this is a bit of a usability issue – is there any way I could configure (or patch) Rails to get the stacktrace to show me the partial that was failing, rather than the penultimate (and perfectly fine) layout?

I hope I’m explaining this issue coherently.

Thanks,

Ulysse

---

<div class="post-metadata">

**Author:** ![Tamara\_Temple](https://avatars.discourse-cdn.com/v4/letter/t/c37758/32.png) [@Tamara\_Temple](https://discuss.rubyonrails.org/u/Tamara_Temple)\
**Post date:** [December 26, 2013, 12:25am UTC](https://discuss.rubyonrails.org/t/stack-traces-when-using-render/68291/2 "2013-12-26T00:25:47Z")

</div>

You are. I don't disagree with your sentiment here. Even with the better\_errors gem this isn't shown. I end up tailing the log files which does show the actual error messages.
