HTTP Streaming with Ruby on Rails running with JRuby (on Tomcat)

nosretep
Fri, 02 Mar 2012 05:58:36 -0000

Is there any way to utilize Rails HTTP Streaming, the conventional way
provided in Ruby on Rails 3.1, with JRuby (running in Tomcat)?

I did not expect this to work, but I''ll post the error message anyway:

NameError (uninitialized constant
ActionView::StreamingTemplateRenderer::Fiber):

/path/to/tomcat/webapps/ROOT/WEB-INF/gems/gems/actionpack-3.2.1/lib/action_view/renderer/streaming_template_renderer.rb:71:in
`delayed_render''

/path/to/tomcat/webapps/ROOT/WEB-INF/gems/gems/actionpack-3.2.1/lib/action_view/renderer/abstract_renderer.rb:38:in
`instrument''

/path/to/tomcat/webapps/ROOT/WEB-INF/gems/gems/activesupport-3.2.1/lib/active_support/notifications.rb:123:in
`instrument''

/path/to/tomcat/webapps/ROOT/WEB-INF/gems/gems/activesupport-3.2.1/lib/active_support/notifications/instrumenter.rb:20:in
`instrument''

/path/to/tomcat/webapps/ROOT/WEB-INF/gems/gems/activesupport-3.2.1/lib/active_support/notifications.rb:123:in
`instrument''

/path/to/tomcat/webapps/ROOT/WEB-INF/gems/gems/actionpack-3.2.1/lib/action_view/renderer/abstract_renderer.rb:38:in
`instrument''

/path/to/tomcat/webapps/ROOT/WEB-INF/gems/gems/actionpack-3.2.1/lib/action_view/renderer/streaming_template_renderer.rb:70:in
`delayed_render''

/path/to/tomcat/webapps/ROOT/WEB-INF/gems/gems/actionpack-3.2.1/lib/action_view/renderer/streaming_template_renderer.rb:56:in
`render_template''

/path/to/tomcat/webapps/ROOT/WEB-INF/gems/gems/actionpack-3.2.1/lib/action_view/renderer/streaming_template_renderer.rb:23:in
`call''

/path/to/tomcat/webapps/ROOT/WEB-INF/gems/gems/actionpack-3.2.1/lib/action_view/renderer/streaming_template_renderer.rb:23:in
`each''

/path/to/tomcat/webapps/ROOT/WEB-INF/gems/gems/rack-1.4.1/lib/rack/chunked.rb:23:in
`each''

/path/to/tomcat/webapps/ROOT/WEB-INF/gems/gems/actionpack-3.2.1/lib/action_dispatch/http/response.rb:44:in
`send''

/path/to/tomcat/webapps/ROOT/WEB-INF/gems/gems/actionpack-3.2.1/lib/action_dispatch/http/response.rb:44:in
`each''

/path/to/tomcat/webapps/ROOT/WEB-INF/gems/gems/rack-1.4.1/lib/rack/body_proxy.rb:26:in
`send''

/path/to/tomcat/webapps/ROOT/WEB-INF/gems/gems/rack-1.4.1/lib/rack/body_proxy.rb:26:in
`method_missing''

file:/path/to/tomcat/webapps/ROOT/WEB-INF/lib/jruby-rack-1.1.4.jar!/jruby/rack/response.rb:103:in
`send''

file:/path/to/tomcat/webapps/ROOT/WEB-INF/lib/jruby-rack-1.1.4.jar!/jruby/rack/response.rb:103:in
`write_body''

file:/path/to/tomcat/webapps/ROOT/WEB-INF/lib/jruby-rack-1.1.4.jar!/jruby/rack/response.rb:50:in
`respond''


my controller looks like:
class ApplicationController < ActionController::Base
  def index
    render :stream => true
  end
end


Thanks in advance for any pointers. Thanks again!

--
You received this message because you are subscribed to the Google Groups
"Ruby on Rails: Talk" group.
To view this discussion on the web visit