Rendering empty view when used in a sinatra application
benschwarz opened this issue · 3 comments
benschwarz commented
my config.ru:
require 'rubygems' require 'bundler' Bundler.setup require ::File.dirname(__FILE__) + '/app' require 'rack/pagespeed' use Rack::ContentLength # Set Content-Length on string bodies use Rack::ETag # Set E-Tags on string bodies use Rack::ConditionalGet # If-Modified-Since use Rack::Deflater # Compress HTML using deflate / gzip use Rack::Head # Head requests must return an empty body case ENV['RACK_ENV'] when "development" cache_store = :disk when "production" memcached_server = ENV['MEMCACHE_USERNAME'] + ":" + ENV['MEMCACHE_PASSWORD'] + "@" + ENV['MEMCACHE_SERVERS'].join cache_store = {memcached: memcached_server} end use Rack::PageSpeed, public: "public" do store cache_store inline_javascripts max_size: 4000 inline_css combine_javascripts end run Sinatra::Application
damn html messed up the issue, I gist'd it instead:
juliocesar commented
You may have noticed, but the contents of the codes above aren't showing.
As I understand it you're getting empty views on a Sinatra app. I've set up a test app to try and replicate the problem, but I couldn't. Mind having a look?
Tested on Ruby 1.9.2-p0, Sinatra latest, rack-pagespeed 1.0.2, Rack latest.
juliocesar commented
Weird! I'm definitely getting the view as expected in here. If you send over versions for stuffs, I'll look into it more carefully.
juliocesar commented
Closing as the issue could not be replicated, and as per previous conversations, seems related to one particular version of Ruby (?).