using Rack::ESI as middleware causes content not to display
I'm running a rails 2.3.11 project and when I include your gem and set the Rack::ESI middleware, the site no longer returns content. It seems that the request is processed, but the content is never returned to the browser.
I'm working on a threaded version which will support Rails 2 and 3.
Could you try again with the latest sources?
will do, i'll let you know how it goes.
Seems the same thing happens. According to the development.log, the page renders, but the content of the page is blank.
Can you gist me some code/log?
Is the source empty, too?
This is my config in environment.rb
https://gist.github.com/1253963
And nothing comes back from the server (empty document). It seems that just by adding the config in the above jist causes the server to return no content (even if I call pages that don't make an esi call)
please use :insert instead of :use for adding the middleware, and can you add the views/layouts to the gist?
I used insert and get the error below (passenger error) when I attempt to access the site:
Error message: no implicit conversion from nil to integer Exception class: TypeError Application root: /Users/kdurante/projects/ci/site_content Backtrace:
File Line Location
0 /Users/kdurante/.rvm/gems/ree-1.8.7-2010.02@site_content/gems/actionpack-2.3.11/lib/action_controller/middleware_stack.rb 91 in insert' 1 /Users/kdurante/.rvm/gems/ree-1.8.7-2010.02@site_content/gems/actionpack-2.3.11/lib/action_controller/middleware_stack.rb 91 ininsert'
2 ./config/environment.rb 10
3 /Users/kdurante/.rvm/gems/ree-1.8.7-2010.02@site_content/gems/rails-2.3.11/lib/initializer.rb 111 in run' 4 ./config/environment.rb 9 5 config.ru 5 inrequire'
6 config.ru 5
7 /Users/kdurante/.rvm/gems/ree-1.8.7-2010.02@site_content/gems/rack-1.1.2/lib/rack/builder.rb 46 in instance_eval' 8 /Users/kdurante/.rvm/gems/ree-1.8.7-2010.02@site_content/gems/rack-1.1.2/lib/rack/builder.rb 46 ininitialize'
9 config.ru 1 in `new'
10 config.ru 1
You can either use insert with a numeric integer or provide an already chained middleware you want to insert before, but that's Rails manual. For simplicity let's say insert at 0. It's important to insert rack-esi before a static file middleware is called so we can include static files.
Regards Florian
My environment.rb file looks like this: config.middleware.insert(0, Rack::ESI)
And my layout/views/output looks like this: https://gist.github.com/1268114
As you can see, nothing gets rendered after the esi include.
please only use paths (/pricing/delivery_quote), not full URIs (http://customink.local/pricing/delivery_quote).
It's the same no matter what. I used paths originally and switched to
full uri's wondering if the request was even leaving the server.
Thanks, Karle
On Oct 6, 2011, at 3:27 PM, Florian Aßmann <reply+i-1511681-03e90f501ee6a7464aeb6661532e8f70018a605a@reply.github.co m> wrote:
please only use paths (/pricing/delivery_quote), not full URIs (http://customink.local/pricing/delivery_quote ).
Reply to this email directly or view it on GitHub: https://github.com/boof/rack-esi/issues/2#issuecomment-2313952