Question

I've installed Rack-Bug for my Rails app, but can't get the panels to appear.

project: http://github.com/brynary/rack-bug additional instructions: https://github.com/brynary/rack-bug/wiki/security yet more instructions: Rack Bug Installation issue. Server does not start (the docs really suck for this one)

From the top:

I added config.middleware.use 'Rack::Bug' to config/environments/development.rb. I added a file config/initializers/rack_bug.rb containing the following:

require 'rack/bug'
require 'ipaddr'

ActionController::Dispatcher.middleware.use Rack::Bug,
  :ip_masks   => [IPAddr.new('192.168.2.2')],
  :secret_key => 'epT5uCIchlsHCeR9dloOeAPG66PtHd9K8l0q9avitiaA/KUrY7DE52hD4yWY+8z1',
  :password   => 'password'

(I specified the IP address for my desktop. The app is running on my linux dev server at .2.3)

I went to /rack_bug/bookmarklet.html and dragged the "Toggle Rack::Bug" bookmarklet to my Firefox bookmark toolbar. I loaded a page on my Rails App, clicked the "Toggle Rack::Bug" bookmarklet, typed in the password in the popup box, clicked OK, and the page was reloaded - but with no Rack-Bug panels.

Not sure why it's not working, and there's no irc channel or google group for it.

UPDATE: And the fun keeps on leaving. Still no progress on loading the panels from Firefox on my windows desktop. However, I fired up Firefox on my linux dev server, grabbed the bookmarklet, then went to the home page of my app and clicked on it. Filled in the password, and when it reloaded, got a 500 error. Here are the first four lines from the log output:

Status: 500 Internal Server Error
undefined method `length' for #<Pathname:/home/ofer/src/ssp3>
  /usr/lib/ruby/gems/1.8/gems/ruby-openid-2.1.7/lib/openid/extras.rb:3:in `starts_with?'
  /home/ofer/src/ssp3/vendor/plugins/rack-bug/lib/rack/bug/panels/sql_panel/query.rb:65:in `filtered_backtrace'

So, I still haven't fixed the first problem, and now I've discovered a second which will still be around even if I fix the first problem. The second error seems to imply that Firefox on the dev server was actually loading the panel when the error hit, which apparently is in the ruby-openid internals.

I feel even more set back than before.

Was it helpful?

Solution

My guess: http://github.com/SamSaffron/rack-bug/commit/16daa41b0ac9513e2d0a2b09ad9941fcb9c5d189

Had the same problem so I wrote that patch, I'll do a pull request

OTHER TIPS

I had the same problem and after fiddling around a bit found that you should reload the page without using the browser cache (i.e. press Ctrl-F5)

Is your Linux development server on the same subnet as your desktop? If it isn't then you need to specify your desktop's IP address as it appears to the server. For example my desktop's IP address is 192.X.X.X but from my production server it appears as 84.X.X.X because it's routed through my ISP's gateway.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top