pboling / rack-insight

Debugging toolbar for Rack applications implemented as middleware
http://railsbling.com/retired_projects/rack-insight/
MIT License
152 stars 22 forks source link

Feature: Support Rails 2.3.X #13

Open ryangreenberg opened 11 years ago

ryangreenberg commented 11 years ago

I installed rack-insight in a Rails 2.3.11 application and put the following in my development.rb config:

config.middleware.use "Rack::Insight::App", :secret_key => "whatever"

When I run my server and try to access an endpoint, I get the following error:

Tue Oct 02 00:02:31 +0000 2012: Read error: #<NoMethodError: undefined method `_probe' for #<Rack::Insight::Instrumentation::ProbeDefinition:0x112632550>>
/Users/ryangreenberg/.rbenv/versions/ree-1.8.7-2010.02/lib/ruby/gems/1.8/gems/rack-insight-0.5.23/lib/rack/insight/panel.rb:122:in `send'
/Users/ryangreenberg/.rbenv/versions/ree-1.8.7-2010.02/lib/ruby/gems/1.8/gems/rack-insight-0.5.23/lib/rack/insight/panel.rb:122:in `initialize'
/Users/ryangreenberg/.rbenv/versions/ree-1.8.7-2010.02/lib/ruby/gems/1.8/gems/rack-insight-0.5.23/lib/rack/insight/instrumentation/package-definition.rb:54:

When I manually specify the panels and remove some of them I am able to get a different error.

pboling commented 11 years ago

No consideration has been made for Rails 2.3. This fork of Rack-Bug started out explicitly as a Rails 3 upgrade of the project. It has since become Rails 3 only. I am not sure how difficult it would be to get Rails 2.3 support back, but it would be worth looking into.

pboling commented 11 years ago

@ryangreenberg I have restructured the probing a bit. If you have time, please test with the latest release, 0.5.27.

I am working toward a 0.6 release and would love to include support for Rails 2.3. As part of 0.6 I plan to extract out each panel into its own gem so that they can be shipped independently and be targeted at different versions of Rails/Sinatra/etc.