brynary / rack-bug

Debugging toolbar for Rack applications implemented as middleware
MIT License
1.08k stars 104 forks source link

Renders HTTP 500 when enabled. #1

Closed mwilliams closed 14 years ago

mwilliams commented 15 years ago

Enabling rack-bug with the bookmarklet returns 500's for any requests made against my app, disabling it returns to normal functionality. Any thoughts?

Console output: https://gist.github.com/13e071c3827d1c86004e

brynary commented 15 years ago

Thanks for the report.

Try master now and let me know if it's fixed. I added a #to_s which I hope will resolve this.

mwilliams commented 15 years ago

Pulled down master and saw your change but still receiving a 500. https://gist.github.com/13e071c3827d1c86004e

yaroslav commented 15 years ago

Fixed in my fork. Rails does not have Rails::Info in production or whatever. Awaiting brynary merge

mwilliams commented 15 years ago

Excellent! Thanks for the awesome work guys, it's much appreciated!

markoa commented 15 years ago

Please note that I had to change two lines in lib/rack/bug/panels/sql_panel/query.rb to boot Mongrel with a Rails 2.3.2 app:

    def filtered_backtrace
      @filtered_backtrace ||= @backtrace.map { |l| l.to_s.strip }.select do |line|
        line.starts_with?(Rails.root.to_s) &&
        !line.starts_with?(Rails.root.join("vendor").to_s)
      end
    end
lukemelia commented 14 years ago

I believe this is fully resolved with 0.3.0