To do this without any pry plugins (I had problems with pry-stack_explorer), just look at caller .
I'm really looking for my project name to filter out all the unnecessary elements of the rail stack. For example, if my project name is archie , I would use:
caller.select {|line| line.include? "archie" }
Which gives me the stack trace I'm looking for.
Shorter way:
caller.select {|x| x["archie"] }
Which works just as well.
Paul Oliver Feb 07 '14 at 5:49 2014-02-07 05:49
source share