No stacktrace from faulty view code

Hello

I am having trouble with my rails environment. Everything works fine
excepts that errors in view code does not show a stacktrace, just the
"We're sorry, but something went wrong." page, and the log just shows a
"500 Internal Server Error" line.

I am running in development mode, and errors in controller code show a
stacktrace.

Could someone first confirm that rendering view code like: "<% bogus %>"
should indeed show a stacktrace, and not just an "We're sorry, but
something went wrong." page?

I'm using ruby 1.9.3 and theese are my gems installed:

actionmailer (3.2.8)
actionpack (3.2.8)
activemodel (3.2.8)
activerecord (3.2.8)
activeresource (3.2.8)
activesupport (3.2.8)
arel (3.0.2)
builder (3.0.3)
bundler (1.2.1)
coffee-rails (3.2.2)
coffee-script (2.2.0)
coffee-script-source (1.3.3)
erubis (2.7.0)
execjs (1.4.0)
hike (1.2.1)
i18n (0.6.1)
journey (1.0.4)
jquery-rails (2.1.3)
json (1.7.5)
libv8 (3.3.10.4 x86_64-linux)
mail (2.4.4)
mime-types (1.19)
multi_json (1.3.6)
polyglot (0.3.3)
rack (1.4.1)
rack-cache (1.2)
rack-ssl (1.3.2)
rack-test (0.6.2)
rails (3.2.8)
railties (3.2.8)
rake (0.9.2.2)
rdoc (3.12)
rubygems-bundler (1.1.0)
rvm (1.11.3.5)
sass (3.2.1)
sass-rails (3.2.5)
sprockets (2.1.3)
sqlite3 (1.3.6)
therubyracer (0.10.2)
thor (0.16.0)
tilt (1.3.3)
treetop (1.4.11)
tzinfo (0.3.33)
uglifier (1.3.0)

Thanks

That’s all you’ll get in production - exposing stack traces to the public is

generally considered a potential security hole.

For monitoring errors in production, there are a bunch of choices:

This one has been around forever, and will send you an email every time

your users get a 500 Server Error.

Provides a nice web interface and some tools for aggregating error reports,

tracking deploys, etc. They’ve got a free plan if you’d like to try it out.

Primarily focused on measuring application performance, but also tracks errors.

Also has a free plan to try out.

–Matt Jones

Hello

I am having trouble with my rails environment. Everything works fine
excepts that errors in view code does not show a stacktrace, just the
"We're sorry, but something went wrong." page, and the log just shows a
"500 Internal Server Error" line.

I am running in development mode, and errors in controller code show a
stacktrace.

Could someone first confirm that rendering view code like: "<% bogus %>"
should indeed show a stacktrace, and not just an "We're sorry, but
something went wrong." page?

Yes, in development mode you should get a stack trace wherever the
error occurs. Have you touched config/development.rb? If you think
not then post it here. Are you sure you are in development mode? Put
a syntax error in development.rb to check. I think you may have to
restart the server after changing development.rb.

Colin

Hello

I am having trouble with my rails environment. Everything works fine
excepts that errors in view code does not show a stacktrace, just the
"We're sorry, but something went wrong." page, and the log just shows a
"500 Internal Server Error" line.

I am running in development mode, and errors in controller code show a
stacktrace.

Could someone first confirm that rendering view code like: "<% bogus %>"
should indeed show a stacktrace, and not just an "We're sorry, but
something went wrong." page?

That's all you'll get in production - exposing stack traces to the public is
generally considered a potential security hole.

Of course. But this is development, as the OP has been at pains to explain to us.

I can confirm the same thing in Rails 3.latest, and I posted a full stack trace from a view error in 3.0.latest. Not sure where the break point is, I only have 3.0.latest and 3.latest here, perhaps someone with 3.1.latest could test and confirm -- only takes a few minutes if you have the gems.

Thanks,

Walter

This issue is solved in my older thread here:
http://www.ruby-forum.com/topic/4406056

Thanks anyway guys.

Daniel