# What the heck - corruped mongrel server?

**URL:** <https://www.ruby-forum.com/t/what-the-heck-corruped-mongrel-server/111013>\
**Category:** Rails\
**Created:** [August 1, 2007, 11:11pm UTC](https://www.ruby-forum.com/t/what-the-heck-corruped-mongrel-server/111013 "2007-08-01T23:11:07Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![dkitchel](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/7ba0ec/32.png) [@dkitchel](https://www.ruby-forum.com/u/dkitchel)\
**Post date:** [August 1, 2007, 11:11pm UTC](https://www.ruby-forum.com/t/what-the-heck-corruped-mongrel-server/111013/1 "2007-08-01T23:11:07Z")

</div>

I’m running a new instillation of rails on osx

With some minor headaches and some bizarre puzzles still unsolved like  
the “Stack level too deep” error when I run a ruby scrip within the  
rails environment, but works fine on the command line…

Anyway, now I get a NoMethodError every time I open a page using a  
different conroller. When I shut the server (mongrel) down and reboot,  
the page giving me a NoMethodError works perfectly until I link to a  
page using another controller. There is no problem with the code as it  
runs perfectly with a mongrel reboot, and I can load the page over and  
over again with different parameters and get the results I expect.  
What’s corrupting mongrel instantaneously whenever I use a different  
controller?

Generally the NoMethodError comes from a call to something like this

@globalvariable = ClassName.find(params[:id])

@globalvariable.relatedtableviaid.each do |d|

I get a NoMethodError with an undefined method for the related table  
until I reboot mongrel.

All my models are set up correctly with belongs\_to and has\_many etc.

---

<div class="post-metadata">

**Author:** ![dkitchel](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/7ba0ec/32.png) [@dkitchel](https://www.ruby-forum.com/u/dkitchel)\
**Post date:** [August 2, 2007, 3:06am UTC](https://www.ruby-forum.com/t/what-the-heck-corruped-mongrel-server/111013/2 "2007-08-02T03:06:45Z")

</div>

See the patch to active\_support in changeset 6426, below. Not sure if  
your problem is the same, but sounds as if it could be. I didn’t move  
all the way to edge, just applied the one patch, and my NoMethodError  
problems have vanished.

[http://dev.rubyonrails.org/ticket/6720](http://dev.rubyonrails.org/ticket/6720)  
[http://dev.rubyonrails.org/ticket/6951](http://dev.rubyonrails.org/ticket/6951)  
and  
[http://dev.rubyonrails.org/changeset/6426](http://dev.rubyonrails.org/changeset/6426)
