Robert Klemme
2/24/2005 9:27:00 AM
<ryan@nglaptop.home> schrieb im Newsbeitrag
news:87oeea9ymv.fsf@nglaptop.home...
> I am having problems with large file uploads over http using
> cgi object and eruby(when the file is small enough the stringio
> version works fine... the problem seems to be with tempfile object).
> The reported problem from the backtrace is:
>
>
> superclass mismatch for class Tempfile
> /usr/lib/ruby/1.8/tempfile.rb:12
> /usr/lib/ruby/1.8/auto-reload.rb:77:in `load'
> /usr/lib/ruby/1.8/auto-reload.rb:77:in `require'
> /usr/lib/ruby/1.8/cgi.rb:986:in `read_multipart'
> /usr/lib/ruby/1.8/cgi.rb:983:in `loop'
> /usr/lib/ruby/1.8/cgi.rb:983:in `read_multipart'
> /usr/lib/ruby/1.8/cgi.rb:1103:in `initialize_query'
> /usr/lib/ruby/1.8/cgi.rb:2269:in `initialize'
>
> ---- This is my code -----
> /var/www/unico/admin/test2.rhtml:6:in `new'
> /var/www/unico/admin/test2.rhtml:6
> ---- end of my code -----
>
> (eval):117
> /usr/lib/ruby/1.8/apache/eruby-run.rb:116:in `eval_string_wrap'
> /usr/lib/ruby/1.8/apache/eruby-run.rb:116:in `run'
> /usr/lib/ruby/1.8/apache/eruby-run.rb:72:in `handler'
>
>
> After investigating the error message on the web and playing games
> with the source files, I'm stumped!!!
>
> Using irb as to do some testing the command:
>
> require 'tempfile' => false
>
> So hopefully that is part of the problem....
No, that just indicates that the lib was not loaded for this require but
earlier:
10:25:12 [robert.klemme]: irbs
>> Tempfile
=> Tempfile
>> require 'tempfile'
=> false
>> Tempfile
=> Tempfile
> I am using the latest debian package of ruby 1.8 with eruby and apache
> 1.3
>
> Thanks in advance for any advice that can be shed on this circumstance
Maybe you got two different Tempfile on the classpath - err - library
path.
Regards
robert