I found the problem. I was defining a new method content_type in the class
Tempfile.

*class Tempfile
  def content_type
    mime_type = IO.popen("file --brief --mime #{path}").gets unless
path.blank?
    mime_type
  end
end*

How can I make this without breaking generators? I've already tried the
following one (exactly how it is on the tempfile.rb), but it didn't work:

*class Tempfile < DelegateClass(File)
   ...
end*

Should I enclose it by *module SomeModuleName ... end* ?

Thanks in advance.

Att.
*
Rodrigo Felix de Almeida*
Promine Tecnologia da Informação - www.promine.com.br
Project Manager
Sun Certified Java Programmer



On Thu, Sep 23, 2010 at 10:58 AM, Rodrigo Felix <
rodrigofelixdealme...@gmail.com> wrote:

> OK, but how can I know which class is instantiating TempFile or
> DelegateClass? I guess it is related to some plugin, but I`m not sure.
>
>
> Att.
> *
> Rodrigo Felix de Almeida*
> Promine Tecnologia da Informação - www.promine.com.br
> Project Manager
> Sun Certified Java Programmer
>
>
>
> On Thu, Sep 23, 2010 at 1:42 AM, Raja Venkataraman 
> <li...@ruby-forum.com>wrote:
>
>> Rodrigo Felix wrote:
>> > I've been facing a problem when generating a model (or controller, ...).
>> > I'm
>> > using rails 2.3.8 and ruby 1.8.7.
>> > Has anybody been facing anything like this?
>>
>> Do you have 2 instances of TempFile (tempfile.rb) or DelegateClass
>> (delegate.rb) ? Googling around seems to suggest this as a problem.
>>
>> -- raja
>> --
>> Posted via http://www.ruby-forum.com/.
>>
>> --
>> You received this message because you are subscribed to the Google Groups
>> "Ruby on Rails: Talk" group.
>> To post to this group, send email to rubyonrails-t...@googlegroups.com.
>> To unsubscribe from this group, send email to
>> rubyonrails-talk+unsubscr...@googlegroups.com<rubyonrails-talk%2bunsubscr...@googlegroups.com>
>> .
>> For more options, visit this group at
>> http://groups.google.com/group/rubyonrails-talk?hl=en.
>>
>>
>

-- 
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to rubyonrails-t...@googlegroups.com.
To unsubscribe from this group, send email to 
rubyonrails-talk+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.

Reply via email to