From mboxrd@z Thu Jan 1 00:00:00 1970 Delivered-To: chneukirchen@gmail.com Received: by 10.229.96.67 with SMTP id g3csp277032qcn; Wed, 30 May 2012 00:53:11 -0700 (PDT) Return-Path: Received-SPF: pass (google.com: domain of rack-devel+bncCNSYpqGTFhDmo5f-BBoEGJX9wA@googlegroups.com designates 10.216.140.26 as permitted sender) client-ip=10.216.140.26; Authentication-Results: mr.google.com; spf=pass (google.com: domain of rack-devel+bncCNSYpqGTFhDmo5f-BBoEGJX9wA@googlegroups.com designates 10.216.140.26 as permitted sender) smtp.mail=rack-devel+bncCNSYpqGTFhDmo5f-BBoEGJX9wA@googlegroups.com; dkim=pass header.i=rack-devel+bncCNSYpqGTFhDmo5f-BBoEGJX9wA@googlegroups.com Received: from mr.google.com ([10.216.140.26]) by 10.216.140.26 with SMTP id d26mr1577316wej.4.1338364390218 (num_hops = 1); Wed, 30 May 2012 00:53:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlegroups.com; s=beta; h=x-beenthere:received-spf:date:from:to:subject:message-id:references :mime-version:in-reply-to:user-agent:x-original-sender :x-original-authentication-results:reply-to:precedence:mailing-list :list-id:x-google-group-id:list-post:list-help:list-archive:sender :list-subscribe:list-unsubscribe:content-type:content-disposition; bh=kzc0hqOr5/W9dixEjKwQcc7nMjWQNe4sOLJRpeYvuWY=; b=dKV4UE6WGBjtU7IHNPxvoIWmycFNjCzydjR0KoE3H7xHRESSinNDtQCxWqUGV33Ahe OMD2Va1rUaQqvq2RZJ5WHYQoCV1XuN5LCGySxeNRYXsSBoVpZ3uy5eItIFbhg1QZR9Cg GG3R3vVT3/ebMhmb0PBdH9HwQU2USoT+kpv/Q= Received: by 10.216.140.26 with SMTP id d26mr215561wej.4.1338364390004; Wed, 30 May 2012 00:53:10 -0700 (PDT) X-BeenThere: rack-devel@googlegroups.com Received: by 10.180.8.42 with SMTP id o10ls3489116wia.3.canary; Wed, 30 May 2012 00:53:08 -0700 (PDT) Received: by 10.216.140.219 with SMTP id e69mr2380482wej.1.1338364388366; Wed, 30 May 2012 00:53:08 -0700 (PDT) Received: by 10.216.140.219 with SMTP id e69mr2380481wej.1.1338364388353; Wed, 30 May 2012 00:53:08 -0700 (PDT) Received: from dcvr.yhbt.net (dcvr.yhbt.net. [64.71.152.64]) by gmr-mx.google.com with ESMTP id a10si5736430wix.2.2012.05.30.00.53.07; Wed, 30 May 2012 00:53:08 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of normalperson@yhbt.net designates 64.71.152.64 as permitted sender) client-ip=64.71.152.64; Received: from localhost (dcvr.yhbt.net [127.0.0.1]) by dcvr.yhbt.net (Postfix) with ESMTP id 2A4E91F42E; Wed, 30 May 2012 07:53:07 +0000 (UTC) Date: Wed, 30 May 2012 07:53:06 +0000 From: Eric Wong To: rack-devel@googlegroups.com Subject: Re: "singleton can't be dumped" error when storing an object in session Message-ID: <20120530075306.GA2718@dcvr.yhbt.net> References: <7274e9f9-adb2-4f84-bbf7-84538ddd3922@googlegroups.com> <63a04e19-5c3b-4308-8dc5-f234a9801446@googlegroups.com> MIME-Version: 1.0 In-Reply-To: <63a04e19-5c3b-4308-8dc5-f234a9801446@googlegroups.com> User-Agent: Mutt/1.5.20 (2009-06-14) X-Original-Sender: normalperson@yhbt.net X-Original-Authentication-Results: gmr-mx.google.com; spf=pass (google.com: best guess record for domain of normalperson@yhbt.net designates 64.71.152.64 as permitted sender) smtp.mail=normalperson@yhbt.net Reply-To: rack-devel@googlegroups.com Precedence: list Mailing-list: list rack-devel@googlegroups.com; contact rack-devel+owners@googlegroups.com List-ID: X-Google-Group-Id: 486215384060 List-Post: , List-Help: , List-Archive: Sender: rack-devel@googlegroups.com List-Subscribe: , List-Unsubscribe: , Content-Type: text/plain; charset=us-ascii Content-Disposition: inline armanx wrote: > On Saturday, May 26, 2012 2:39:08 AM UTC-7, armanx wrote: > > I'm using Rack::Session::Cookie to store an object (a Sequel model > > returned by a database call) in the session. However, I'm getting a > > "singleton can't be dumped" error when trying to do so. What is the reason > > for this error? (top-posting corrected) You need to look up the definition of a singleton object. > > The interesting thing is, I only get the error when the Sequel object is > > first saved in the database then returned; the error is absent when the > > record already exists in the database and is returned via select (without > > saving), yet in both cases the objects/classes are identical. Not a Sequel expert here, but could it be Sequel is giving you a different return value than what you expect? Can you share this piece of code that's giving you trouble? > Is it possible that the object is too large for the 4kb cookie size limit > and that's what is causing this error? No, based on your error, it's not too large.