unicorn Ruby/Rack server user+dev discussion/patches/pulls/bugs/help
 help / color / mirror / code / Atom feed
From: Jeremy Evans <jeremyevans0@gmail.com>
To: unicorn list <mongrel-unicorn@rubyforge.org>
Subject: Re: Unicorn and home_run
Date: Tue, 24 Aug 2010 14:38:17 -0700	[thread overview]
Message-ID: <AANLkTin5V8NOOTecaj2FNAw9H89Rr7Ab3-VtjNx+PZkH@mail.gmail.com> (raw)
In-Reply-To: <20100824195813.GA10622@dcvr.yhbt.net>

On Tue, Aug 24, 2010 at 12:58 PM, Eric Wong <normalperson@yhbt.net> wrote:
> Clifton King <cliftonk@gmail.com> wrote:
>> I got a "The message's content type was not explicitly allowed" when trying
>> to send an email to the group.
>
> Hi, we only allow plain text and patches on the mailing list, no HTML.
>
>> > From: Clifton King <cliftonk@gmail.com>
>> > 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 following
>> > 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 libraries
>> > 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?  I 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


  parent reply	other threads:[~2010-08-24 21:38 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <mailman.96.1282670516.23553.mongrel-unicorn@rubyforge.org>
     [not found] ` <AANLkTingOCVVTyCDbA8RC=Vf7LV=HyCMhtqcJ4RLg9Xy@mail.gmail.com>
2010-08-24 19:58   ` Unicorn and home_run Eric Wong
2010-08-24 20:39     ` Clifton King
2010-08-24 21:38     ` Jeremy Evans [this message]
2010-08-25  7:50       ` Eric Wong
2010-08-25 14:46         ` Jeremy Evans
2010-08-26  4:33           ` Eric Wong

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:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

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

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

  git send-email \
    --in-reply-to=AANLkTin5V8NOOTecaj2FNAw9H89Rr7Ab3-VtjNx+PZkH@mail.gmail.com \
    --to=jeremyevans0@gmail.com \
    --cc=mongrel-unicorn@rubyforge.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://yhbt.net/unicorn.git/

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