tempfile and cgi problems

Discussion in 'Ruby' started by ryan@nglaptop.home, Feb 24, 2005.

  1. Guest

    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
     
    , Feb 24, 2005
    #1
    1. Advertising

  2. <> schrieb im Newsbeitrag
    news:...
    > 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
     
    Robert Klemme, Feb 24, 2005
    #2
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Matt Garman
    Replies:
    1
    Views:
    313
    Matt Garman
    Nov 10, 2004
  2. billiejoex

    tempfile.mkstemp and os.fdopen

    billiejoex, Aug 28, 2007, in forum: Python
    Replies:
    9
    Views:
    426
    billiejoex
    Aug 29, 2007
  3. Replies:
    4
    Views:
    253
    buffi
    Sep 15, 2007
  4. Nicholas Manning

    tempfile.rb and unlink on windows

    Nicholas Manning, May 19, 2009, in forum: Ruby
    Replies:
    2
    Views:
    230
    Nicholas Manning
    May 19, 2009
  5. Alex van der Spek

    Difference between tempfile and spooled tempfile?

    Alex van der Spek, Apr 5, 2012, in forum: Python
    Replies:
    2
    Views:
    365
    Steve Howell
    Apr 5, 2012
Loading...

Share This Page