Rainbows! Rack HTTP server user/dev discussion
 help / color / mirror / code / Atom feed
* undefined method `each' for nil:NilClass (NoMethodError)
@ 2012-06-22 17:55 Claudio Poli
       [not found] ` <CANp6Qo+CO6mF=+CrEKcPRRxCP=b335Bw=YCYOnAGSFeD2CV_Gg-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
  0 siblings, 1 reply; 2+ messages in thread
From: Claudio Poli @ 2012-06-22 17:55 UTC (permalink / raw)
  To: rainbows-talk-GrnCvJ7WPxnNLxjTenLetw

Hello,
I started getting this exception a lot: http://pastie.org/4133611

Probably happens when a client interrupts the connection.

Any clue?

Thanks.
_______________________________________________
Rainbows! mailing list - rainbows-talk-GrnCvJ7WPxnNLxjTenLetw@public.gmane.org
http://rubyforge.org/mailman/listinfo/rainbows-talk
Do not quote signatures (like this one) or top post when replying


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: undefined method `each' for nil:NilClass (NoMethodError)
       [not found] ` <CANp6Qo+CO6mF=+CrEKcPRRxCP=b335Bw=YCYOnAGSFeD2CV_Gg-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
@ 2012-06-22 19:34   ` Eric Wong
  0 siblings, 0 replies; 2+ messages in thread
From: Eric Wong @ 2012-06-22 19:34 UTC (permalink / raw)
  To: Rainbows! list; +Cc: Claudio Poli

Claudio Poli <masterkain-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:
> Hello,
> I started getting this exception a lot: http://pastie.org/4133611
> 
> Probably happens when a client interrupts the connection.
> 
> Any clue?

Hi Claudio,

What can you tell us about your application?  What framework,
environment, versions are you using?

>From what I see, something in your Rack application stack is causing
an invalid Rack response (nil in the body).   A valid Rack response
is a 3 part array:

0 - status
    #to_i makes it an HTTP status code (e.g. 200, "200 OK")

1 - headers
    #each yields through a pair of stringifiable objects
    (e.g. Rack::Utils::HeaderHash, Hash)

2 - body (this is where you're getting a nil, which is wrong)
    This must respond to #each and yield a single string
    (e.g. Array, IO...)
    May optionally respond to :to_path and :closes

-- 
Eric Wong
_______________________________________________
Rainbows! mailing list - rainbows-talk-GrnCvJ7WPxnNLxjTenLetw@public.gmane.org
http://rubyforge.org/mailman/listinfo/rainbows-talk
Do not quote signatures (like this one) or top post when replying


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2012-06-22 19:40 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-06-22 17:55 undefined method `each' for nil:NilClass (NoMethodError) Claudio Poli
     [not found] ` <CANp6Qo+CO6mF=+CrEKcPRRxCP=b335Bw=YCYOnAGSFeD2CV_Gg-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2012-06-22 19:34   ` Eric Wong

Code repositories for project(s) associated with this public inbox

	https://yhbt.net/rainbows.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).