Technology Insights

ActiveRecord SQL in script/console

Rails’ ActiveRecord displays the exact SQL queries it performs into the development log. It is inconvenient to watch this log while you’re working in the `script/console` environment, however, and most advice for redirecting that log to STDOUT seemed not to work. Thanks to [Jamis Buck]( “More on watching ActiveRecord”), though, the solution has come to light: