Rainbows! Rack HTTP server user/dev discussion
 help / color / mirror / code / Atom feed
From: Eric Wong <normalperson-rMlxZR9MS24@public.gmane.org>
To: Rainbows! list <rainbows-talk-GrnCvJ7WPxnNLxjTenLetw@public.gmane.org>
Cc: Claudio Poli <masterkain-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
Subject: Re: undefined method `each' for nil:NilClass (NoMethodError)
Date: Fri, 22 Jun 2012 19:34:46 +0000	[thread overview]
Message-ID: <20120622193446.GA20228@dcvr.yhbt.net> (raw)
In-Reply-To: <CANp6Qo+CO6mF=+CrEKcPRRxCP=b335Bw=YCYOnAGSFeD2CV_Gg-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>

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
Do not quote signatures (like this one) or top post when replying

      parent reply	other threads:[~2012-06-22 19:40 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-06-22 17:55 Claudio Poli
     [not found] ` <CANp6Qo+CO6mF=+CrEKcPRRxCP=b335Bw=YCYOnAGSFeD2CV_Gg-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2012-06-22 19:34   ` Eric Wong [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:

  List information: https://yhbt.net/rainbows/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20120622193446.GA20228@dcvr.yhbt.net \
    --to=normalperson-rmlxzr9ms24@public.gmane.org \
    --cc=masterkain-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
    --cc=rainbows-talk-GrnCvJ7WPxnNLxjTenLetw@public.gmane.org \
    --subject='Re: undefined method `each'\'' for nil:NilClass (NoMethodError)' \


* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

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


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).