# Models failing under mongrel

**URL:** <https://www.ruby-forum.com/t/models-failing-under-mongrel/66681>\
**Category:** Rails\
**Created:** [August 28, 2006, 1:06pm UTC](https://www.ruby-forum.com/t/models-failing-under-mongrel/66681 "2006-08-28T13:06:27Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![casper\_the\_ghost](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/58956e/32.png) [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Post date:** [August 28, 2006, 1:06pm UTC](https://www.ruby-forum.com/t/models-failing-under-mongrel/66681/1 "2006-08-28T13:06:27Z")

</div>

I have a simple model (Payment Gateway) which simply represents the  
attributes of a number of payment gateways.

A shopping cart controller executes a find to determine which payment  
gateways are available, this is simple:

@payment\_gateways = PaymentGateway.find(:all, conditions =\> [ ‘enabled  
= ?’, true] )

This executes fine on all our test servers including Debian, Ubuntu and  
our Macs running on webbrick, lighty and fastcgi

However, on Redhat EL4, we’re running under mongrel and also trying  
under mongrel cluster.

The class and method work fine after a server restart, however, as soon  
as mongrel is restarted, we lose the ability to access the class and  
method. We can’t get the model back until we reboot the server.

Here’s the error we get:

undefined method `find’ for Public::PaymentGateway:Module

has anyone had any issues with these disappearing models?

Thanks in advance,

Andy
