Rails rescue_from 如何获取更详细错误信息

jay_li · December 12, 2012 · Last by zzhattzzh replied at December 14, 2012 · 2782 hits

SyntaxError in Categories#index

Showing /home/work/focus_mail/app/views/categories/index.html.erb where line #52 raised: /home/work/focus_mail/app/views/categories/index.html.erb:52: syntax error, unexpected $end, expecting '}'

Extracted source (around line #52): 52: <%= form_tag "/categories/update/#{list.id}", :class => 'form-horizontal hidden' , remote: true, :id=> "editlist#{list.id %}" do %> Trace of template inclusion: app/views/categories/index.html.erb

上面的报错 rescue_from 只能获取 exception.message SyntaxError in Categories#index /home/work/focus_mail/app/views/categories/index.html.erb:52: syntax error, unexpected $end, expecting '}'

而怎么样获取 Extracted source (around line #52):这样详细的细节信息?!

exception.backtrace

You need to Sign in before reply, if you don't have an account, please Sign up first.