Log a backtrace in rails
If you're in a tough spot, debugging-wise, in your rails app, you can log your entire backtrace to see who called whom. Just put this snippet in the troublesome spot:
begin
raise "boom"
rescue => detail
RAILS_DEFAULT_LOGGER.info detail.backtrace.join("\n")
end