Forum: Ruby on Rails Stack traces when using render

221559a7ff10c547cb5a9c14b512b6bb?d=identicon&s=25 Ulysse Carion (Guest)
on 2013-12-25 12:14
(Received via mailing list)
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
Aa082c8b00a50928e5860dcd70bf2368?d=identicon&s=25 tamouse m. (tamouse_m)
on 2013-12-26 01:26
(Received via mailing list)
On Tue, Dec 24, 2013 at 8:09 PM, Ulysse Carion
<ulyssecarion@gmail.com>wrote:

>   <%= render student %>
>
> Thanks,
>
> Ulysse
>
>
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.
Please log in before posting. Registration is free and takes only a minute.
Existing account

NEW: Do you have a Google/GoogleMail, Yahoo or Facebook account? No registration required!
Log in with Google account | Log in with Yahoo account | Log in with Facebook account
No account? Register here.