Rainbows! Rack HTTP server user/dev discussion
 help / color / 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, back to index

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

Rainbows! Rack HTTP server user/dev discussion

Archives are clonable:
	git clone --mirror http://bogomips.org/rainbows-public
	git clone --mirror http://ou63pmih66umazou.onion/rainbows-public

Example config snippet for mirrors

Newsgroups are available over NNTP:
	nntp://news.public-inbox.org/inbox.comp.lang.ruby.rainbows
	nntp://ou63pmih66umazou.onion/inbox.comp.lang.ruby.rainbows

 note: .onion URLs require Tor: https://www.torproject.org/

AGPL code for this site: git clone https://public-inbox.org/public-inbox.git