How to debug Rails application?

debugging, ruby, ruby-on-rails

Solution

You can either do it the quick and dirty way, in your code:

raise my_object.inspect

This will throw an exception with the information about the object.

Or use the ruby-debug gem.

I recommend you read the Debugging Rails Applications chapter in the Rails documentation.

Problem

I'm new to Ruby on Rails and I'm facing quite a number of logical errors which I'm unaware of. Like a normal programmer, the thing to solve your errors is by debugging it first. May I know how to debug it? Because when i tried doing so, it already shows me an error: "Uncaught exception: uninitialized constant Object::ApplicationController" May I know how to solve this error and how to debug? Thanks! :)

Original source

Related problems