From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on dcvr.yhbt.net X-Spam-Level: * X-Spam-ASN: AS33070 50.56.128.0/17 X-Spam-Status: No, score=1.0 required=3.0 tests=AWL,HK_RANDOM_FROM, MSGID_FROM_MTA_HEADER,TVD_RCVD_IP shortcircuit=no autolearn=no version=3.3.2 Path: news.gmane.org!not-for-mail From: Eric Wong Newsgroups: gmane.comp.lang.ruby.rainbows.general Subject: Re: undefined method `each' for nil:NilClass (NoMethodError) Date: Fri, 22 Jun 2012 19:34:46 +0000 Message-ID: <20120622193446.GA20228@dcvr.yhbt.net> References: NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Trace: dough.gmane.org 1340394019 2284 80.91.229.3 (22 Jun 2012 19:40:19 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Fri, 22 Jun 2012 19:40:19 +0000 (UTC) Cc: Claudio Poli To: Rainbows! list Original-X-From: rainbows-talk-bounces-GrnCvJ7WPxnNLxjTenLetw@public.gmane.org Fri Jun 22 21:40:18 2012 Return-path: Envelope-to: gclrrg-rainbows-talk@m.gmane.org X-Original-To: rainbows-talk-GrnCvJ7WPxnNLxjTenLetw@public.gmane.org Delivered-To: rainbows-talk-GrnCvJ7WPxnNLxjTenLetw@public.gmane.org Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) X-BeenThere: rainbows-talk-GrnCvJ7WPxnNLxjTenLetw@public.gmane.org X-Mailman-Version: 2.1.12 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: rainbows-talk-bounces-GrnCvJ7WPxnNLxjTenLetw@public.gmane.org Errors-To: rainbows-talk-bounces-GrnCvJ7WPxnNLxjTenLetw@public.gmane.org Xref: news.gmane.org gmane.comp.lang.ruby.rainbows.general:369 Archived-At: Received: from 50-56-192-79.static.cloud-ips.com ([50.56.192.79] helo=rubyforge.org) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1Si9iI-0002z6-E2 for gclrrg-rainbows-talk@m.gmane.org; Fri, 22 Jun 2012 21:40:14 +0200 Received: from localhost.localdomain (localhost [127.0.0.1]) by rubyforge.org (Postfix) with ESMTP id 29AD02E05E; Fri, 22 Jun 2012 19:40:13 +0000 (UTC) Received: from dcvr.yhbt.net (dcvr.yhbt.net [64.71.152.64]) by rubyforge.org (Postfix) with ESMTP id 163ED2E05E for ; Fri, 22 Jun 2012 19:34:47 +0000 (UTC) Received: from localhost (dcvr.yhbt.net [127.0.0.1]) by dcvr.yhbt.net (Postfix) with ESMTP id C7E551F42C; Fri, 22 Jun 2012 19:34:46 +0000 (UTC) Claudio Poli 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