query_reviewer icon indicating copy to clipboard operation
query_reviewer copied to clipboard

Template Missing (clobbers view path?)

Open sdhull opened this issue 12 years ago • 9 comments

This is what I get when I try to use this gem. It makes me sad. :(

Template is missing

Missing template tasks/edit.erb in view path /Users/sdhull/.rvm/gems/ree-1.8.7-2011.03@my_gemset/gems/query_reviewer-0.1.5/lib/query_reviewer/lib/query_reviewer/views:/Users/sdhull/.rvm/gems/ree-1.8.7-2011.03@my_gemset/gems/preferences-0.4.2/app/views

I've tried disabling the inject_view option, but it doesn't help. Googling shows a few similar errors/stacktraces in pasties and gists, but no answers. Help please!

sdhull avatar Apr 05 '12 00:04 sdhull

Can you be more specific? Rails version? Is that a template you would expect to be there (tasks/edit)?

nesquena avatar Apr 05 '12 01:04 nesquena

Yes it should work, and did work prior to installation -- no views work anymore after installation.

Rails 2.3.10

From googling "Template is Missing query_reviewer" http://pastebin.com/bdEgSpkV http://pastie.org/1335880/wrap https://gist.github.com/93159

sdhull avatar Apr 05 '12 04:04 sdhull

FWIW, I commented out the append_view_path line and this fixed it. I'm just manually doing <%= query_review_output %> in my application layout.

Would it be possible to check config before calling append_view_path and not calling it if inject_view is false?

sdhull avatar Apr 05 '12 22:04 sdhull

OK maybe I was a bit too quick to say this was working with that line commented out. I mean at least I'm not getting a 500 for every page in my app now, but query_reviewer is definitely not working.

This is what I get on /dashboard (and every other page in my app):

SQL OK
Total queries: 0   MySQL Database Time: 0.000s
With warnings: 0 (0%)
Without warnings: 0 (0%)
Type:
Safe queries:
No queries to display.
Disable analysis report on next page load and from now on.

Compare with the server log:

Completed in 10191ms (View: 4717, DB: 5034) | 200 OK [http://localhost/dashboard]

Does anyone have this working with ree-1.8.7, Rails 2.3.x and MySQL?

sdhull avatar Apr 06 '12 17:04 sdhull

I definitely had a version of this working with 1.8.7, Rails 2.3 and MySQL. Can you try version 1.2 of this gem and see if it works?

nesquena avatar Apr 06 '12 19:04 nesquena

I've downgraded to v0.1 (the 1st version pushed to RubyGems), and still no luck. I also still needed to comment out the call to append_view_path in order to have it quit clobbering the Rails view_paths.

If you can tell me a known version (commit hash) that worked with Rails 2.3.x, I can try pointing Bundler to that particular sha. I'dd really like to get this working. Otherwise I guess I can try out bullet.

sdhull avatar Apr 06 '12 20:04 sdhull

Bullet is very cool, kind of a different tool, query_reviewer is definitely more full featured if you can get it working. I was definitely personally using query_reviewer with my rails 2.3 project with the earliest versions of this gem. I don't think a particular sha will work any better. Still, I find that kind of odd, I wonder what is so different between our two projects.

Unfortunately I have since started using postgresql on all my projects and since it is not really supported, I have stopped using query_reviewer. I am still happy to take patches and release gems though if other people want to help keep this project alive.

nesquena avatar Apr 06 '12 20:04 nesquena

I'm experiencing the same issue (missing template, appears that append_view_path is clobbering all of my view paths).

Last I used query_reviewer with this rails 2.3 app it worked flawlessly. I've since upgraded from ruby v1.8.7 => v1.9.3, as well as a host of other changes. Just a guess, I'll dig into it when I have time avail.

bmishkin avatar Oct 29 '13 16:10 bmishkin

Just a guess, I'll dig into it when I have time avail.

Thanks!

nesquena avatar Oct 30 '13 08:10 nesquena