# Passenger won't allow ActiveRecord to be extended?

**URL:** <https://www.ruby-forum.com/t/passenger-wont-allow-activerecord-to-be-extended/151265>\
**Category:** Rails\
**Created:** [October 19, 2008, 1:05am UTC](https://www.ruby-forum.com/t/passenger-wont-allow-activerecord-to-be-extended/151265 "2008-10-19T01:05:36Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![S-gw](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/ed655f/32.png) [@S-gw](https://www.ruby-forum.com/u/S-gw)\
**Post date:** [October 19, 2008, 1:05am UTC](https://www.ruby-forum.com/t/passenger-wont-allow-activerecord-to-be-extended/151265/1 "2008-10-19T01:05:36Z")

</div>

After much tinkering, I have discovered that any module or plugin which  
extends ActiveRecord causes Passenger to fail (application won’t load at  
all).

Is this a known behavior?

I have confirmed that my Passenger installation is working just fine  
with a simple Rails application that does not modify AR.

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.

(admittedly cross posted from Passenger user list to cast broader net on  
this one because it’s Saturday, and I’d really like to solve it before  
Monday)

– gw
