[Mongrel] works with webrick,lighty, not mongrel

Luis Lavena luislavena at gmail.com
Sat Nov 4 10:06:20 EST 2006

On 10/31/06, Michael Fairchild <rmdf at stimble.net> wrote:
> Hello,
>   I've been working away to setup mongrel as my production server, however I
> am running into an odd problem and am not sure where to investigate for the
> answer.
>   When I run using mongrel_rails start most things work fine, but a I get a
> few inexplicable undefined method errors, for example:
> undefined method `send_qbxml' for #<Sync:0x2aaaafa7aa78>
> The method is definitley there, and can be accessed from console.  Further,
> I tried running with webrick, and it worked as expected.  I tried lightty
> and it worked.

Thats because naming clashes... try put your Sync class implementation
inside a module, that will clear the global namespace for the ruby
standard Sync class.

module MyApp
  class Sync

In that way, both Sync will co exist friendly, and to call your Sync
class you will need to do:

MyApp::Sync instead of plain "Sync".

> I am hoping to both get this working, and understand why such an error would
> occur.  Does anyone have any suggestions?

Hope that clears the image about the issue.

> Thanks a lot,
> Michael Fairchild
> _______________________________________________
> Mongrel-users mailing list
> Mongrel-users at rubyforge.org
> http://rubyforge.org/mailman/listinfo/mongrel-users

Luis Lavena
Multimedia systems
Leaders are made, they are not born. They are made by hard effort,
which is the price which all of us must pay to achieve any goal that
is worthwhile.
Vince Lombardi

More information about the Mongrel-users mailing list