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

Rainbows! Rack HTTP server user/dev discussion

This inbox may be cloned and mirrored by anyone:

	git clone --mirror https://yhbt.net/rainbows-public
	git clone --mirror http://ou63pmih66umazou.onion/rainbows-public

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V1 rainbows-public rainbows-public/ https://yhbt.net/rainbows-public \
		rainbows-public@yhbt.net rainbows-public@bogomips.org rainbows-talk@rubyforge.org rainbows-talk-GrnCvJ7WPxnNLxjTenLetw@public.gmane.org
	public-inbox-index rainbows-public

Example config snippet for mirrors.
Newsgroups are available over NNTP:
	nntp://news.public-inbox.org/inbox.comp.lang.ruby.rainbows
	nntp://7fh6tueqddpjyxjmgtdiueylzoqt6pt7hec3pukyptlmohoowvhde4yd.onion/inbox.comp.lang.ruby.rainbows
 note: .onion URLs require Tor: https://www.torproject.org/

code repositories for project(s) associated with this inbox:

	../../../rainbows.git

AGPL code for this site: git clone http://7fh6tueqddpjyxjmgtdiueylzoqt6pt7hec3pukyptlmohoowvhde4yd.onion/public-inbox.git