unicorn Ruby/Rack server user+dev discussion/patches/pulls/bugs/help
 help / color / mirror / code / Atom feed
* Re: Unicorn and home_run
       [not found] ` <AANLkTingOCVVTyCDbA8RC=Vf7LV=HyCMhtqcJ4RLg9Xy@mail.gmail.com>
@ 2010-08-24 19:58   ` Eric Wong
  2010-08-24 20:39     ` Clifton King
  2010-08-24 21:38     ` Jeremy Evans
  0 siblings, 2 replies; 6+ messages in thread
From: Eric Wong @ 2010-08-24 19:58 UTC (permalink / raw)
  To: mongrel-unicorn; +Cc: Clifton King

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?

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.

-- 
Eric Wong
_______________________________________________
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


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Unicorn and home_run
  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
  1 sibling, 0 replies; 6+ messages in thread
From: Clifton King @ 2010-08-24 20:39 UTC (permalink / raw)
  To: Eric Wong; +Cc: mongrel-unicorn

Eric,

Starting it with "home_run unicorn_rails" does work.

Using home_run --install and then unicorn_rails does not.

We use preload_app in production and I doubt that anything except the
home_run --install method would work for us. Using irb, script/server
(mongrel), etc work fine using home_run --install.

Thanks,
Clifton

On Tue, Aug 24, 2010 at 2: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?
>
> 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.
>
> --
> Eric Wong
_______________________________________________
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

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Unicorn and home_run
  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
  2010-08-25  7:50       ` Eric Wong
  1 sibling, 1 reply; 6+ messages in thread
From: Jeremy Evans @ 2010-08-24 21:38 UTC (permalink / raw)
  To: unicorn list

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


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Unicorn and home_run
  2010-08-24 21:38     ` Jeremy Evans
@ 2010-08-25  7:50       ` Eric Wong
  2010-08-25 14:46         ` Jeremy Evans
  0 siblings, 1 reply; 6+ messages in thread
From: Eric Wong @ 2010-08-25  7:50 UTC (permalink / raw)
  To: unicorn list

Jeremy Evans <jeremyevans0@gmail.com> wrote:
> > 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.

Yeah, I figured using the "home_run" wrapper would be less than
ideal since it would get lost during exec upgrades and newer
versions of home_run wouldn't get picked up the same way it'd get
picked up in a system install.

> I think this problem is solved in the master branch.

Thanks.  I'd be eager to hear how it works out since this could be a
popular library very soon :) Is there a home_run mailing list I could
follow?

-- 
Eric Wong
_______________________________________________
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


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Unicorn and home_run
  2010-08-25  7:50       ` Eric Wong
@ 2010-08-25 14:46         ` Jeremy Evans
  2010-08-26  4:33           ` Eric Wong
  0 siblings, 1 reply; 6+ messages in thread
From: Jeremy Evans @ 2010-08-25 14:46 UTC (permalink / raw)
  To: unicorn list

On Wed, Aug 25, 2010 at 12:50 AM, Eric Wong <normalperson@yhbt.net> wrote:
> Jeremy Evans <jeremyevans0@gmail.com> wrote:
>> > 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.
>
> Yeah, I figured using the "home_run" wrapper would be less than
> ideal since it would get lost during exec upgrades and newer
> versions of home_run wouldn't get picked up the same way it'd get
> picked up in a system install.

The home_run wrapper works by modifying the environment (RUBYLIB and
RUBYOPT). Does the environment get reset during exec upgrades?

You are correct that newer versions would not get picked up, as it's
going to hard code a specific gem version.

>> I think this problem is solved in the master branch.
>
> Thanks.  I'd be eager to hear how it works out since this could be a
> popular library very soon :) Is there a home_run mailing list I could
> follow?

I haven't set up a mailing list for it (you are the first person to
ask about one), but I've been hanging out by myself in #home_run on
freenode (IRC).

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


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Unicorn and home_run
  2010-08-25 14:46         ` Jeremy Evans
@ 2010-08-26  4:33           ` Eric Wong
  0 siblings, 0 replies; 6+ messages in thread
From: Eric Wong @ 2010-08-26  4:33 UTC (permalink / raw)
  To: unicorn list

Jeremy Evans <jeremyevans0@gmail.com> wrote:
> On Wed, Aug 25, 2010 at 12:50 AM, Eric Wong <normalperson@yhbt.net> wrote:
> > Yeah, I figured using the "home_run" wrapper would be less than
> > ideal since it would get lost during exec upgrades and newer
> > versions of home_run wouldn't get picked up the same way it'd get
> > picked up in a system install.
> 
> The home_run wrapper works by modifying the environment (RUBYLIB and
> RUBYOPT). Does the environment get reset during exec upgrades?

The environment is untouched by default.  I meant Unicorn can only see
$0 as 'unicorn' or 'unicorn_rails', and never 'home_run', so the
version changes can't be picked up.

> You are correct that newer versions would not get picked up, as it's
> going to hard code a specific gem version.

> > Thanks.  I'd be eager to hear how it works out since this could be a
> > popular library very soon :) Is there a home_run mailing list I could
> > follow?
> 
> I haven't set up a mailing list for it (you are the first person to
> ask about one), but I've been hanging out by myself in #home_run on
> freenode (IRC).

Ah, I've mostly given up on IRC since I get distracted easily or
everybody pops in at different times and lack of threading makes it hard
to follow.  I much prefer the asynchronous nature of email along with
its ease of archival, search, and patch exchange.  For intense
emergencies where money is lost for every second something is awry, yes,
IRC is great, but I do Free Software development at a much more relaxed
pace :)

-- 
Eric Wong
_______________________________________________
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


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2010-08-26  4:36 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [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
2010-08-25  7:50       ` Eric Wong
2010-08-25 14:46         ` Jeremy Evans
2010-08-26  4:33           ` Eric Wong

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