tempfile and cgi problems

R

ryan

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....


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
 
R

Robert Klemme

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
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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Staff online

Members online

Forum statistics

Threads
473,767
Messages
2,569,571
Members
45,045
Latest member
DRCM

Latest Threads

Top