Here are two examples of the Rails server log for the error I encountered while changing the version of Ruby.
Ruby 2.4.2 , Rails 5.1.4, Puma 3.11.0:
NoMethodError - undefined method `recent' for #<Event:0x00007f08507bf8b8>: path/to/show.html.haml:50:in `block in _path_to_show_html_haml___4224769623360811234_28796540' path/to/show.html.haml:30:in `_path_to_show_html_haml___4224769623360811234_28796540'
Ruby 2.5.0 , Rails 5.1.4, Puma 3.11.0:
NoMethodError - undefined method `recent' for #<Event:0x00007f8ccc1b9508>:
What can I do to re-enable stack tracing in the Rails log? This is not like the way to view the file / line number you need to look at.
To help with the investigation, I added this to my ApplicationController :
rescue_from Exception do |exception| byebug 1+1 end
Ruby 2.4.2
(byebug) exception.backtrace
Ruby 2.5.0
(byebug) exception.backtrace nil
source share