Forum: Ruby on Rails Verbose traces (debugging question)

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
2b1b2c4661dd593b46ecd24492bc243d?d=identicon&s=25 Michael Judge (bluetrust)
on 2006-01-24 05:35
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:in `self_eval'
  #{RAILS_ROOT}/app/models/interview.rb:57:in `self_eval'
  #{RAILS_ROOT}/app/models/interview.rb:25:in `continue_from'
  #{RAILS_ROOT}/app/models/interview.rb:19:in `enter_from'
  #{RAILS_ROOT}/app/controllers/interview_controller.rb:26:in `index'

`self_eval' in interview.rb looks like a good place to start, but
considering that I ran a 2,000 line questionnaire through method
`self_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 topic is locked and can not be replied to.