Verbose traces (debugging question)

Is there a way to coax a verbose trace out of Ruby on Rails?

For example, I just received this execution dump:

undefined method `pr’ for {“Q-SA1”=>“3”}:Answers

#{RAILS_ROOT}/app/models/interview.rb:58:in self_eval' (eval):6:inself_eval’
#{RAILS_ROOT}/app/models/interview.rb:57:in self_eval' #{RAILS_ROOT}/app/models/interview.rb:25:incontinue_from’
#{RAILS_ROOT}/app/models/interview.rb:19:in enter_from' #{RAILS_ROOT}/app/controllers/interview_controller.rb:26:inindex’

self_eval' in interview.rb looks like a good place to start, but considering that I ran a 2,000 line questionnaire through methodself_eval’, it’s a red herring. The real problem is somewhere in that
questionnaire. In the end, it turned out that I misspelled ‘or’ as ‘pr’
(in method `has_value?’ within class Answers.) But you can see why I’d
be complaining about the level of detail.

Back in my perl days, I remember a module that would log the name of
each method executed in the course of an application’s run. You didn’t
want it on all the time because it was slow as hell and could suck up a
huge amount of memory if it was a big script, but for the first stages
of development it was pretty great.

So what do you say? Know of a better trace for Ruby on Rails “pr” a
better way to debug syntax errors fast?

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs