Aborted request to mini-profiler-resources/results

Hi, I have issue with miniprofiler. Firebug console shows that requests to mini-profiler-resources/results are aborted.

My rails version is 3.2.1 and my ruby version is 1.9.3p125.

Error from log:

!! Unexpected error while processing request: undefined method `has_key?' for nil:NilClass

Screenshots:

alt text

alt text

any way you can get me a full stack trace? sometimes you need thin or mongrel if passenger is aborting stuff.

Here is backtrace from mongrel:

2012-08-01 12:51:13 +0300: Read error: #<NoMethodError: undefined method `has_key?' for nil:NilClass>
/home/gnzh/work/appoint/vendor/bundle/ruby/1.9.1/gems/yajl-ruby-1.1.0/lib/yajl/json_gem/encoding.rb:23:in `generate'
/home/gnzh/work/appoint/vendor/bundle/ruby/1.9.1/gems/rack-mini-profiler-0.1.9/lib/mini_profiler/timer_struct.rb:25:in `to_json'
/home/gnzh/work/appoint/vendor/bundle/ruby/1.9.1/gems/yajl-ruby-1.1.0/lib/yajl.rb:72:in `encode'
/home/gnzh/work/appoint/vendor/bundle/ruby/1.9.1/gems/yajl-ruby-1.1.0/lib/yajl.rb:72:in `encode'
/home/gnzh/work/appoint/vendor/bundle/ruby/1.9.1/gems/yajl-ruby-1.1.0/lib/yajl/json_gem/encoding.rb:27:in `generate'
/home/gnzh/work/appoint/vendor/bundle/ruby/1.9.1/gems/rack-mini-profiler-0.1.9/lib/mini_profiler/page_timer_struct.rb:48:in `to_json'
/home/gnzh/work/appoint/vendor/bundle/ruby/1.9.1/gems/rack-mini-profiler-0.1.9/lib/mini_profiler/profiler.rb:127:in `serve_results'
/home/gnzh/work/appoint/vendor/bundle/ruby/1.9.1/gems/rack-mini-profiler-0.1.9/lib/mini_profiler/profiler.rb:149:in `serve_html'
/home/gnzh/work/appoint/vendor/bundle/ruby/1.9.1/gems/rack-mini-profiler-0.1.9/lib/mini_profiler/profiler.rb:201:in `call'
/home/gnzh/work/appoint/vendor/bundle/ruby/1.9.1/gems/railties-3.2.1/lib/rails/engine.rb:479:in `call'
/home/gnzh/work/appoint/vendor/bundle/ruby/1.9.1/gems/railties-3.2.1/lib/rails/application.rb:220:in `call'
/home/gnzh/work/appoint/vendor/bundle/ruby/1.9.1/gems/rack-1.4.1/lib/rack/content_length.rb:14:in `call'
/home/gnzh/work/appoint/vendor/bundle/ruby/1.9.1/gems/railties-3.2.1/lib/rails/rack/log_tailer.rb:14:in `call'
/home/gnzh/work/appoint/vendor/bundle/ruby/1.9.1/gems/rack-1.4.1/lib/rack/handler/mongrel.rb:77:in `process'
/home/gnzh/work/appoint/vendor/bundle/ruby/1.9.1/gems/mongrel-1.2.0.pre2/lib/mongrel.rb:165:in `block in process_client'
/home/gnzh/work/appoint/vendor/bundle/ruby/1.9.1/gems/mongrel-1.2.0.pre2/lib/mongrel.rb:164:in `each'
/home/gnzh/work/appoint/vendor/bundle/ruby/1.9.1/gems/mongrel-1.2.0.pre2/lib/mongrel.rb:164:in `process_client'
/home/gnzh/work/appoint/vendor/bundle/ruby/1.9.1/gems/mongrel-1.2.0.pre2/lib/mongrel.rb:291:in `block (2 levels) in run'

aha … I never tested with yajl (the super fast json serializer) will add a few tests for that. could be an incompatibility

aha … I never tested with yajl (the super fast json serializer) will add a few tests for that. could be an incompatibility

Can you test this with the latest release, it should be fixed

Thanks, it works now!

can you test on latest?

@sam

╰─➤ bundle show rack-mini-profiler
vendor/bundle/ruby/1.9.1/gems/rack-mini-profiler-0.1.9

same issue, log:

!! Unexpected error while processing request: undefined method `has_key?’ for nil:NilClass

Is this still the case in latest?

I don’t have any appropriate environment to test that. Sorry.