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: AS14383 205.234.109.0/24 X-Spam-Status: No, score=-0.6 required=5.0 tests=AWL,FREEMAIL_FROM, MSGID_FROM_MTA_HEADER,RP_MATCHES_RCVD,T_DKIM_INVALID shortcircuit=no autolearn=unavailable version=3.3.2 Path: news.gmane.org!not-for-mail From: Jeremy Evans Newsgroups: gmane.comp.lang.ruby.unicorn.general Subject: Re: Unicorn and home_run Date: Tue, 24 Aug 2010 14:38:17 -0700 Message-ID: References: <20100824195813.GA10622@dcvr.yhbt.net> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable X-Trace: dough.gmane.org 1282685922 9788 80.91.229.12 (24 Aug 2010 21:38:42 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Tue, 24 Aug 2010 21:38:42 +0000 (UTC) To: unicorn list Original-X-From: mongrel-unicorn-bounces@rubyforge.org Tue Aug 24 23:38:40 2010 Return-path: Envelope-to: gclrug-mongrel-unicorn@m.gmane.org X-Original-To: mongrel-unicorn@rubyforge.org Delivered-To: mongrel-unicorn@rubyforge.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:received:in-reply-to :references:date:message-id:subject:from:to:content-type :content-transfer-encoding; bh=0AdK1jpCcgW7+ImukCrw0Cyc+h7/FAfr7Ed1At4loSI=; b=jwevzFdSy70sKhFW1zKVbkefHW5LX0Hh57lfAWkfVWVTMCpvaWeXsxmn8fD2n5ntwn KGd7wgijFG3ozssFtGRaD5NVQ6z9TriluLVcrWsc264X38k+TVfzyWqV325dSXCGQ12T W4ZvmzXfR8Wm4wMGC8yrnAWHBK1PxAWARrI20= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type:content-transfer-encoding; b=pxPaMZzitoKQBeyCT/9eOAOu23HBLWcPWP13O3daIcURCL+nAIIrJyvsj2vKno20cD iP0Ma25j05zouJUc7wxc0760JgjuHkqYoUknF7D1saxs/NHXI2NiDBWSgJoSCFo3DWQ8 V+9cdT5Mj/c7OpkXFjlrjB+glhxKeurPkPiSw= In-Reply-To: <20100824195813.GA10622@dcvr.yhbt.net> X-BeenThere: mongrel-unicorn@rubyforge.org X-Mailman-Version: 2.1.12 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: mongrel-unicorn-bounces@rubyforge.org Errors-To: mongrel-unicorn-bounces@rubyforge.org Xref: news.gmane.org gmane.comp.lang.ruby.unicorn.general:686 Archived-At: Received: from rubyforge.org ([205.234.109.19]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1Oo1CY-0006dV-Ac for gclrug-mongrel-unicorn@m.gmane.org; Tue, 24 Aug 2010 23:38:38 +0200 Received: from rubyforge.org (rubyforge.org [127.0.0.1]) by rubyforge.org (Postfix) with ESMTP id BE32F1858364; Tue, 24 Aug 2010 17:38:37 -0400 (EDT) Received: from mail-qy0-f178.google.com (mail-qy0-f178.google.com [209.85.216.178]) by rubyforge.org (Postfix) with ESMTP id 6A0D7185834E for ; Tue, 24 Aug 2010 17:38:17 -0400 (EDT) Received: by qyk34 with SMTP id 34so7632017qyk.2 for ; Tue, 24 Aug 2010 14:38:17 -0700 (PDT) Received: by 10.229.175.167 with SMTP id ba39mr4784084qcb.181.1282685897744; Tue, 24 Aug 2010 14:38:17 -0700 (PDT) Received: by 10.220.192.71 with HTTP; Tue, 24 Aug 2010 14:38:17 -0700 (PDT) On Tue, Aug 24, 2010 at 12:58 PM, Eric Wong wrote: > Clifton King wrote: >> I got a "The message's content type was not explicitly allowed" when try= ing >> to send an email to the group. > > Hi, we only allow plain text and patches on the mailing list, no HTML. > >> > From: Clifton King >> > To: mongrel-unicorn@rubyforge.org >> > Date: Tue, 24 Aug 2010 12:21:49 -0500 >> > Subject: Unicorn and home_run >> > Hi All, >> > >> > I was trying to get home_run (a C-based Date/DateTime implementation) >> > working with Unicorn http://github.com/jeremyevans/home_run, but using >> > home_run --install then running unicorn_rails would crash with the fol= lowing >> > stack trace on a Ruby 1.8.7 CentOS staging server: >> > http://pastie.org/1111144 >> > >> > I believe this has to do with the order in which ruby's default librar= ies >> > are loaded when running unicorn_rails. Jeremy Evans (home_run's author= ) is >> > available to answer any questions specific to his libraries. > > Are you starting it with "home_run unicorn_rails" or did you install > it system-wide? Clifton told me that was working for him. One of the reasons it may work where the other way didn't is that in addition to setting up the load path, it also requires the library up front. I think this problem is solved in the master branch. The problem is that some libraries require date/format without requiring date. In the standard library date/format.rb does not require date, where it does in home_run. I believe the reason for this error is that previously, in date/format.rb, I was doing: require 'date' unless defined?(Date) But if something opens up the Date class to monkey-patch, it never requires 'date', since the Date class then exists. It appears that json, syck, and rubygems all do this. home_run now does: require 'date' unless defined?(Date::ZONES) Which should fix the issue, as only home_run should be defining that. > Jeremy: would it be easier for home_run to just require the core-Ruby > classes first and then monkey patch the methods individually? =A0I haven't > gotten a chance to look into home_run myself much. home_run is designed as a complete replacement for the standard date library. It's not a monkey patching solution like Date::Performance, so it wouldn't be easier to just require and then overwrite. Jeremy _______________________________________________ Unicorn mailing list - mongrel-unicorn@rubyforge.org http://rubyforge.org/mailman/listinfo/mongrel-unicorn Do not quote signatures (like this one) or top post when replying