[Mongrel] Error on Windows and FreeBSD

kigsteronline at mac.com kigsteronline at mac.com
Wed Sep 6 18:15:29 EDT 2006


Actually this naming problem is one of the hard-to-bite problems that  
hit everyone new and old to Ruby.

We were recently hit by another couple of those name clashes:   turns  
out you can not name your model attribute "binding" (this was  
appropriate for the model "Book"), nor can you use an attribute  
called "target" in your model. The unfortunate name collision problem  
is very hard to detect.  The binding attribute/method was conflicting  
with Proc.binding and throwing error deep down ActiveRecord stack.

If anyone knows a good approach to resolving name conflicts, or at  
least testing whether an issue being diagnosed may be a result of a  
name clash, please share.

Thanks
Konstantin


On Sep 6, 2006, at 1:24 PM, Zed Shaw wrote:

> On Wed, 2006-09-06 at 14:42 +0100, Kris Leech wrote:
>> First off Windows, because actually what I appear to be getting is a
>> Rails error which only occurs when I use Mongrel, using Webrick I  
>> do not
>> get this error.
>> I start Mongrel using:
>> mongrel_rails start
>>
>> I have mongrel, win32-services and mongrel-service gems installed  
>> even
>> through Im not using mongrel as a service at the moment.
>>
>> The whole application works apart from one action. The error I get  
>> is:
>>
>>
>>   NoMethodError in SearchController#results
>>
>> undefined method `table_name' for Stop:Class
>
> Mongrel already has created a class called "Stop", so your class is
> conflicting with it.
>
> Basically, Stop, Start, Restart, are all classes in mongrel to make  
> the
> commands work.
>
>
> -- 
> Zed A. Shaw
> http://www.zedshaw.com/
> http://mongrel.rubyforge.org/
> http://www.lingr.com/room/3yXhqKbfPy8 -- Come get help.
>
> _______________________________________________
> Mongrel-users mailing list
> Mongrel-users at rubyforge.org
> http://rubyforge.org/mailman/listinfo/mongrel-users

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://rubyforge.org/pipermail/mongrel-users/attachments/20060906/ab6d62ae/attachment.html 


More information about the Mongrel-users mailing list