Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Ruby > tempfile and cgi problems

Reply
Thread Tools

tempfile and cgi problems

 
 
ryan@nglaptop.home
Guest
Posts: n/a
 
      02-24-2005
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


 
Reply With Quote
 
 
 
 
Robert Klemme
Guest
Posts: n/a
 
      02-24-2005

<(E-Mail Removed)> schrieb im Newsbeitrag
news:(E-Mail Removed)...
> 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

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Difference between tempfile and spooled tempfile? Alex van der Spek Python 2 04-05-2012 05:42 PM
tempfile.rb and unlink on windows Nicholas Manning Ruby 2 05-19-2009 07:16 PM
problems using pythom tempfile module samir.vds@googlemail.com Python 4 09-15-2007 10:41 PM
tempfile.mkstemp and os.fdopen billiejoex Python 9 08-29-2007 11:25 AM
tempfile and curses (putwin() and getwin()) Matt Garman Python 1 11-10-2004 04:43 AM



Advertisments