When logs doesn't help to troubleshoot and you need to use an interactive debugger with rails and ruby (1.8.5)
  1. install ruby-debug gem
  2. in your controller/library/etc... put a line
      debugger if defined?(Debugger)
    
  3. start you server
      rdebug script/server -n
    
  4. Hit the browser and controller will stop in debugger right on a line next to debugger if defined?(Debugger)