Rails logging to console
One of the best tools in a rails developers arsenal is the rails console, being extremely useful for brainstorming, debugging, and testing. Having it log active record queries directly to the console can improve readability and convenience over looking through the development logs to see what SQL queries have been run.
This works with both rails 2 and rails 3 by adding the following lines to ~/.irbrc
The same can be accomplished though editing environment.rb but I’d prefer to use this method as it will apply to any rails project without modification.