gem prevents certain web pages from being served (throws Encoding::CompatibilityError)
Browsing a static web page on my site fails with miniprofiler enabled, but WORKS if I add ?pp=disable to the url, so seems to be issue inside miniprofiler.
rails (3.1.11) rack-mini-profiler (0.1.23) ruby-1.9.2-p290 Mac OSX development webserver: webrick and thin both give same error
I copied a web page to my public directory, and tried to browse it (tried Firefox and Safari same result):
ERROR Encoding::CompatibilityError: incompatible character encodings: ASCII-8BIT and UTF-8
In logs I see:
ERROR Encoding::CompatibilityError: incompatible character encodings: ASCII-8BIT and UTF-8
/Users/.../gems/rack-mini-profiler-0.1.23/Ruby/lib/mini_profiler/profiler.rb:410:in inject' /Users/.../gems/rack-mini-profiler-0.1.23/Ruby/lib/mini_profiler/profiler.rb:382:inblock in call'
/Users/.../gems/rack-1.3.10/lib/rack/file.rb:104:in block in each' /Users/.../gems/rack-1.3.10/lib/rack/file.rb:96:inopen'
/Users/.../gems/rack-1.3.10/lib/rack/file.rb:96:in each' /Users/.../gems/rack-mini-profiler-0.1.23/Ruby/lib/mini_profiler/profiler.rb:382:incall'
/Users/.../gems/railties-3.1.11/lib/rails/engine.rb:456:in call' /Users/.../gems/railties-3.1.11/lib/rails/application.rb:143:incall'
/Users/.../gems/rack-1.3.10/lib/rack/content_length.rb:14:in call' /Users/.../gems/railties-3.1.11/lib/rails/rack/log_tailer.rb:14:incall'
/Users/.../rack-1.3.10/lib/rack/handler/webrick.rb:59:in service' /Users/...lib/ruby/1.9.1/webrick/httpserver.rb:111:inservice'
/Users/.../lib/ruby/1.9.1/webrick/httpserver.rb:70:in run' /Users/.../lib/ruby/1.9.1/webrick/server.rb:183:inblock in start_thread'
Hi, it appears that you're using the original rack-mini-profiler gem (and you should) instead of this fork (mini-profiler gem). can you make sure you're using their latest version and if the bug persists, report it over at https://github.com/SamSaffron/MiniProfiler/issues instead?