Like most other frameworks, Ruby groups code by Model/View/Controller
of by task, and therefore I’m having a hard time debugging a problem
Agile Rails book where looping through @items errors out because one or
items is nil.
I managed to empty the cart by placing session[:cart] = nil in
the store_controller_rb, and the problem continued after I removed that
diagnostic, thereby proving it wasn’t caused just a bad record that got
there. I’ve examined the dump screen produced by the error every way but
loose and can’t find anything that helps. I went back and looked at
everything I did recently – nothing obvious. I looked at
and saw an error pointing to code I didn’t write (Rails code, in other
I’d like to place diagnostic prints in the controller code to see if I’m
placing nil records in the @items whatever, but where would such
prints print out?
So I need some debugging tips. What are your favorite Rails debugging