Help us understand the problem. What is going on with this article?

sinatra とかの heroku run console で ActiveRecord のデバッグログ表示

More than 5 years have passed since last update.
require "./app" # require what you needed all
require "logger"
ActiveRecord::Base.logger =
heroku run console
> require "./console"
> User.count
D, [2012-07-12T10:25:20.311275 #2] DEBUG -- :    (8.1ms)  SELECT COUNT(*) FROM users

まあ、ローカルの irb とかでも同じですね。
ほかにも heroku run console でいつも入力するものを入れておくと便利。

Why not register and get more from Qiita?
  1. We will deliver articles that match you
    By following users and tags, you can catch up information on technical fields that you are interested in as a whole
  2. you can read useful information later efficiently
    By "stocking" the articles you like, you can search right away