Passenger won't allow ActiveRecord to be extended

7 views
Skip to first unread message

gw

unread,
Oct 21, 2008, 1:08:24 AM10/21/08
to Phusion Passenger Discussions
After much tinkering, I have narrowed down that any module or plugin
which extends ActiveRecord causes Passenger to fail (application won't
load at all).

Is this a known behavior? I don't see anything resembling it in the
bugs list.

I have confirmed that my Passenger installation is working just fine
with a simple Rails application that does not modify AR and
successfully loads and connects to our database,

Passenger 2.0.3
OS X 10.5.4
Built-in Apache 2.2
ruby 1.8.6(114)
Rails 1.2.6

In one case, I'm doing this:

module ActiveRecord
module Validations
module ClassMethods
# adding my custom methods here
end
end
end

And in another, I have created an acts_as plugin which is loaded by
conventional means of:

ActiveRecord::Base.send(:include, GW::ActsAsPessimistic)

This seems to be prettty sttandard stuff, and it works just fine on
several dev boxes using mongrel, so I don't see how I'm supposed to do
anything different in my source code.

I have already tried 'RailsSpawnMethod conservative' and some other
things.

Pretty much I have 24 hrs to fix this, or just bail and go back to
mongrel/monit so we can move on with getting this batch of servers
online.

Any ideas appreciated.

( this the end result of my Rails App Won't Start thread -- I though a
more accurate subject would be better now that I've narrowed down the
cause )

-- gw

Shaun McDonald

unread,
Oct 21, 2008, 2:25:00 AM10/21/08
to phusion-...@googlegroups.com

On 21 Oct 2008, at 06:08, gw wrote:

>
> After much tinkering, I have narrowed down that any module or plugin
> which extends ActiveRecord causes Passenger to fail (application won't
> load at all).
>
> Is this a known behavior? I don't see anything resembling it in the
> bugs list.
>
> I have confirmed that my Passenger installation is working just fine
> with a simple Rails application that does not modify AR and
> successfully loads and connects to our database,
>
> Passenger 2.0.3
> OS X 10.5.4
> Built-in Apache 2.2
> ruby 1.8.6(114)
> Rails 1.2.6

Is there any particular reason for using Rails 1.2.6? That version is
very old (in the history of Rails). Do you get the same problem with
Rails 2+? I very much doubt that Passenger has been tested on rails
prior to version 2. (I'm sure someone will correct me if I'm wrong.)

It may also be that Apple has done something to the built-in apache,
which means that using an external apache is required.

Shaun

gw

unread,
Oct 21, 2008, 4:11:22 AM10/21/08
to Phusion Passenger Discussions
> Is there any particular reason for using Rails 1.2.6?

Yes.

> Do you get the same problem with Rails 2+?

Don't have any reason to test 2+ at the moment, so don't know.

> I very much doubt that Passenger has been tested on rails  
> prior to version 2. (I'm sure someone will correct me if I'm wrong.)

Well, that could be factor. Might also explain why no one on the
Passenger dev team was interested in a problem I posted a few months
back about Passenger also not working with HTTPS GET. Had to bail on
Passenger for that app too. I will search for info on supported Rails
versions.

> It may also be that Apple has done something to the built-in apache,  
> which means that using an external apache is required.

Passenger claims compatibility with the built-in Apache of Mac OS X.

-- gw

Shaun McDonald

unread,
Oct 21, 2008, 5:47:25 AM10/21/08
to phusion-...@googlegroups.com

On 21 Oct 2008, at 09:11, gw wrote:

>
>> Is there any particular reason for using Rails 1.2.6?
>
> Yes.

Out of interest what is it that prevents upgrading to Rails 2?

>
>
>> Do you get the same problem with Rails 2+?
>
> Don't have any reason to test 2+ at the moment, so don't know.

I'm finding that there is performance improvements and some new
features in Rails 2.1 that I'm now using.

>
>
>> I very much doubt that Passenger has been tested on rails
>> prior to version 2. (I'm sure someone will correct me if I'm wrong.)
>
> Well, that could be factor. Might also explain why no one on the
> Passenger dev team was interested in a problem I posted a few months
> back about Passenger also not working with HTTPS GET. Had to bail on
> Passenger for that app too. I will search for info on supported Rails
> versions.
>
>> It may also be that Apple has done something to the built-in apache,
>> which means that using an external apache is required.
>
> Passenger claims compatibility with the built-in Apache of Mac OS X.

I thought that I had read that Passenger doesn't work with the built-
in Apache on Mac OS X. Though it could be that it was only the case on
older versions of Passenger.

Shaun


gw

unread,
Oct 21, 2008, 11:20:29 AM10/21/08
to Phusion Passenger Discussions
> >> Is there any particular reason for using Rails 1.2.6?
>
> > Yes.
>
> Out of interest what is it that prevents upgrading to Rails 2?

Simple, operational stability. App is done, it's in production on
multiple machines, it works, don't screw with it. We're waiting for
the next point release before bothering to go through the exercise of
migrating to the Rails 2.x base. Nothing really compelling to our app
in 2.0/2.1, but by the time you add 2.2, the timing will work out well
for us to update.

Re: "don't screw with it," changing the app from 1.2 to 2.x is big
deal, and simply won't be done for a while yet. Testing Passenger on a
couple new boxes that run in parallel to existing ones is less
threatening to stability (theoretically).

>> I very much doubt that Passenger has been tested on rails
>> prior to version 2. (I'm sure someone will correct me if I'm wrong.)

I just found the release notes for 2.0, and they claim compatibility
with Rails 1.0, so 1.2.6 is not the problem (in theory).


> > Passenger claims compatibility with the built-in Apache of Mac OS X.
>
> I thought that I had read that Passenger doesn't work with the built-
> in Apache on Mac OS X. Though it could be that it was only the case on  
> older versions of Passenger.

That was solved in 1.02 or 1.03 era.

-- gw


Reply all
Reply to author
Forward
0 new messages