jRuby support


#1

Does miniprofiler work in jruby as well? I just tried firing it up now (in 1.9 mode) and got the following:

 NoMethodError: undefined method `bytesize' for #<ActionDispatch::Response:0xd3db5a>
 org/jruby/RubyBasicObject.java:1688:in `__send__' 
 /Users/mhauck/.rvm/gems/jruby-1.6.5.1/gems/rack-mini-profiler-0.1.7/lib/mini_profiler/body_add_proxy.rb:18:in ` method_missing'
 /Users/mhauck/.rvm/gems/jruby-1.6.5.1/gems/rack-1.2.5/lib/rack/utils.rb:276:in `bytesize'
 /Users/mhauck/.rvm/gems/jruby-1.6.5.1/gems/rack-1.2.5/lib/rack/content_length.rb:22:in `call'
 org/jruby/RubyArray.java:1612:in `each'
 org/jruby/RubyEnumerable.java:830:in `inject'
 /Users/mhauck/.rvm/gems/jruby-1.6.5.1/gems/rack-1.2.5/lib/rack/content_length.rb:22:in `call'
 /Users/mhauck/.rvm/gems/jruby-1.6.5.1/gems/rack-1.2.5/lib/rack/handler/webrick.rb:52:in `service'
 /Users/mhauck/.rvm/rubies/jruby-1.6.5.1/lib/ruby/1.9/webrick/httpserver.rb:111:in `service'
 /Users/mhauck/.rvm/rubies/jruby-1.6.5.1/lib/ruby/1.9/webrick/httpserver.rb:70:in `run'
 /Users/mhauck/.rvm/rubies/jruby-1.6.5.1/lib/ruby/1.9/webrick/server.rb:183:in `start_thread'

#2

Looks like the issue was with Rails being old (3.0.10). I’m on 3.2.6 and it works fine now.