Ruby SQL not showing up #98

Open
ksheurs opened this Issue Dec 14, 2012 · 6 comments

Comments

Projects
None yet
5 participants
@ksheurs

ksheurs commented Dec 14, 2012

hi there,

i've added the gem 'rack-mini-profiler' per http://samsaffron.com/archive/2012/07/12/miniprofiler-ruby-edition. i can see render durations, client stats, etc, but no sql logging is happening?

the only queries that sometime show up are schema queries.

i'm using the following:
ruby 1.9.3
rails 3.2.8
postgres

mini_profiler.rb: http://cl.ly/image/191c1O1L0p1l

thanks!

@SamSaffron

This comment has been minimized.

Show comment Hide comment
@SamSaffron

SamSaffron Dec 31, 2012

Owner

can you please include your Gemfile

Owner

SamSaffron commented Dec 31, 2012

can you please include your Gemfile

@jamesgecko

This comment has been minimized.

Show comment Hide comment
@jamesgecko

jamesgecko Mar 13, 2013

I have a similar issue in a large project with ruby 1.8.7, rails 3.0.20, and mysql.

There are 130 gems in my Gemfile, but when the Gemfile is applied to a basic blog example running on the same stack, MiniProfiler logs sql fine.

I have a similar issue in a large project with ruby 1.8.7, rails 3.0.20, and mysql.

There are 130 gems in my Gemfile, but when the Gemfile is applied to a basic blog example running on the same stack, MiniProfiler logs sql fine.

@ngty

This comment has been minimized.

Show comment Hide comment
@ngty

ngty Apr 24, 2013

I've also encountered this issue. Realized that just by having the following in Gemfile isn't sufficient:

gem 'activerecord-postgresql-adapter'
...
gem 'rack-mini-profiler'

I need to explicitly do:

gem 'pg'
gem 'activerecord-postgresql-adapter'
...
gem 'rack-mini-profiler'

Otherwise, miniprofiler wont be able to patch PG::Result & PG::Connection to yield the sql logging.

ngty commented Apr 24, 2013

I've also encountered this issue. Realized that just by having the following in Gemfile isn't sufficient:

gem 'activerecord-postgresql-adapter'
...
gem 'rack-mini-profiler'

I need to explicitly do:

gem 'pg'
gem 'activerecord-postgresql-adapter'
...
gem 'rack-mini-profiler'

Otherwise, miniprofiler wont be able to patch PG::Result & PG::Connection to yield the sql logging.

@SamSaffron

This comment has been minimized.

Show comment Hide comment
@SamSaffron

SamSaffron Jul 30, 2013

Owner

I added a note about this in the install doc, I guess we could defer the monkey patching till the first request. Open to a PR with it.

In the mean time I added a note in the readme

Owner

SamSaffron commented Jul 30, 2013

I added a note about this in the install doc, I guess we could defer the monkey patching till the first request. Open to a PR with it.

In the mean time I added a note in the readme

@uriklar

This comment has been minimized.

Show comment Hide comment
@uriklar

uriklar Apr 10, 2014

Hey Sam. I've got the rack-mini-profiler gem under pg and active-record-postgresql-adapter and still not seeing any sql in my profiling results.. any idea what to look for?

uriklar commented Apr 10, 2014

Hey Sam. I've got the rack-mini-profiler gem under pg and active-record-postgresql-adapter and still not seeing any sql in my profiling results.. any idea what to look for?

@SamSaffron

This comment has been minimized.

Show comment Hide comment
@SamSaffron

SamSaffron Apr 24, 2014

Owner

Really not sure what is going on, maybe try sourcing it from a directory
and add a few puts statements around the area that does the monkey
patching.

On Thu, Apr 10, 2014 at 7:29 PM, Uri Klar notifications@github.com wrote:

Hey Sam. I've got the rack-mini-profiler gem under pg and
active-record-postgresql-adapter and still not seeing any sql in my
profiling results.. any idea what to look for?


Reply to this email directly or view it on GitHubhttps://github.com/SamSaffron/MiniProfiler/issues/98#issuecomment-40058964
.

Owner

SamSaffron commented Apr 24, 2014

Really not sure what is going on, maybe try sourcing it from a directory
and add a few puts statements around the area that does the monkey
patching.

On Thu, Apr 10, 2014 at 7:29 PM, Uri Klar notifications@github.com wrote:

Hey Sam. I've got the rack-mini-profiler gem under pg and
active-record-postgresql-adapter and still not seeing any sql in my
profiling results.. any idea what to look for?


Reply to this email directly or view it on GitHubhttps://github.com/SamSaffron/MiniProfiler/issues/98#issuecomment-40058964
.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment