views:

8

answers:

0

Good morning all,

I'm trying to get Dan Mange's query_stats plugin up and running in my rails app, so I can get a clearer look at the number of queries I'm running.

I've installed the plugin:

script/plugin install http://github.com/dan-manges/query_stats.git

And added the following code (per the rDoc) to my view:

Queries in Controller: <%= queries.count_with_label :controller %>
Queries in View:       <%= queries.count_with_label :view %>
Query Time:            <%= queries.runtime %>

However, when I run my app, I get the following error:

undefined local variable or method `queries' for #<ActionView::Base:0x10a4880b8>

The rDoc mentions reading the documentation for QueryStats::Holder, but I seem to be too much of a novice to understand how to use it. If I put this at the top of my application controller:

include QueryStats

The app produces this error instead:

uninitialized constant QueryStats

I'm pretty sure I'm just ignorant of something that's pretty easy to solve. Does anyone have experience with this plugin?

Thank you