Skip to content


Subversion checkout URL

You can clone with
Download ZIP


Does not work with unicorn, rails 3 and ruby 1.9 #5

bhavinkamani opened this Issue · 0 comments

1 participant


When this plugin is used with unicorn and ruby 1.9. It breaks with following error

Read error: #<NoMethodError: undefined method `each' for #<String:0x00000100d88118>>
/Volumes/DATA/Bhavin/.rvm/gems/ruby-1.9.2-p0/gems/unicorn-3.0.0/lib/unicorn/http_response.rb:45:in `http_response_write'

While debugging, line no. 59 rack/offline.rb is breaking the code.

[200, {"Content-Type" => "text/cache-manifest"}, body.join("\n")]

line no. 45 in unicorn/http_response.rb looks like

body.each { |chunk| socket.write(chunk) }

It would have worked in ruby 1.8. But in 1.9 since String#each is deprecated, the code breaks.

Not sure what is the best solution. Should it be passed as an array? In that case newline will not be send to the browser.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.