Forum: Ruby on Rails Rails console eats my query trace

Posted by Andrew Vit (Guest)
on 2012-08-12 05:38
(Received via mailing list)
I understand that the default since 3.1 is not to log to development.log
anymore and simply display SQL inline in the console (STDOUT). This is 
fine
with me, and I know I can change it by reassigning the
`ActiveRecord::Base.logger` to e.g. `Rails.logger`.

However, I can't seem to get any of the query tracing gems to show me 
the
origin of the SQL queries (bullet, sql-logging, query_trace,
active-record-query-trace). As far as I can tell I've configured these
correctly and their config setting is enabled as `true`...

For example, I've tried using this: https://gist.github.com/1942451

This should set up a log subscriber attached to ActiveRecord. However, 
the
sql method in there never gets called. I'm not really sure what's
happening. Has anyone had success or problems with this?

Thanks,
Andrew Vit
Please log in before posting. Registration is free and takes only a minute.
Existing account (Switch to SSL-encrypted connection)
NEW: Do you have a Google/GoogleMail or Yahoo account? No registration required!
Log in with Google account | Log in with Yahoo account
No account? Register here.