Jeffrey Warren
2008-Aug-31 18:01 UTC
[Instiki-devel] problem "superclass mismatch for class Cookie"
Hi, I encountered this error too, and i believe it has to do with a require ''cgi'' line... there are two, one at /lib/wiki_content.rb and one at /lib/chunks/wiki.rb Since rails (at least the /vendor/rails version) reassigns the Cookie class to superclass DelegateClass in: /vendor/rails/actionpack/lib/action_controller/cgi_ext/cgi_ext/cookie_performance_fix.rb I believe its not good practice to load require ''cgi'' again... since it tries to use the native Ruby version. Still, this is a bit beyond me. I tried using require_dependency, the rails-specific version that loads it each time (only in development mode, it seems), and no effect. I also tried following the require ''cgi'' with: require_dependency ''../vendor/rails/actionpack/lib/action_controller/cgi_ext/cgi_ext'' in a last-ditch attempt to reassign the native Ruby Cookie class. Anyways I''m pretty much in the dark on this one, but I notice that the same error "superclass mismatch for class Cookie" was apparently an issue in 0.12, as per this message: http://rubyforge.org/pipermail/instiki-devel/2007-October/000049.html And I notice that jmonteiro changed *all* the require_dependency calls to simple require calls in /lib/wiki_content.rb to resolve this error, pre-0.13: http://github.com/jmonteiro/instiki/commit/deae731fbeb201a1cbab1567d0859f109267320e However it seems that''s his own repo and that change didn''t make it into trunk, since i don''t see it in my copy of 0.13. I''m running on a mongrel cluster at MediaTemple''s Grid Server, where I hear people have gotten 0.11 running without trouble. From: 1tizio <1tizio <at> gmail.com> Subject: problem "superclass mismatch for class Cookie"<http://news.gmane.org/find-root.php?message_id=%3ca2fd6c6b0808130307p3ee60ed3tdc82f588ac484d02%40mail.gmail.com%3e> Newsgroups: gmane.comp.web.wiki.instiki.devel<http://news.gmane.org/gmane.comp.web.wiki.instiki.devel> Date: 2008-08-13 10:07:44 GMT (2 weeks, 4 days, 7 hours and 36 minutes ago) hi guys, I'' ve a problem with instiki version instiki-0.13.0, when I access for creating a new page the application give me this message : "superclass mismatch for class Cookie". What can I do for solving this problem? thank''s andrea _______________________________________________ Instiki-devel mailing list Instiki-devel <at> rubyforge.org http://rubyforge.org/mailman/listinfo/instiki-devel -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://rubyforge.org/pipermail/instiki-devel/attachments/20080831/0bb7926d/attachment.html>
Jeffrey Warren
2008-Sep-01 01:21 UTC
[Instiki-devel] problem "superclass mismatch for class Cookie"
Oddly, on reviewing the logs, it seems that changing all the
require_dependency lines to simple require is actually rendering...
but oddly i get a 500 in the browser. I haven''t encountered this
mismatch between a 200 OK in the log and a 500 in the browser, seems
like something to do with dispatch or mongrel...
Processing WikiController#show (for 24.128.51.200 at 2008-08-31 16:55:07) [GET]
Session ID: 43342cdab4f67c6c2bb4a4905c035b59
Parameters: {"action"=>"show",
"id"=>"HomePage",
"controller"=>"wiki",
"web"=>"wiki"}
Checking DNSBL 200.51.128.24.list.dsbl.org
Checking DNSBL 200.51.128.24.bl.spamcop.net
Checking DNSBL 200.51.128.24.sbl-xbl.spamhaus.org
24.128.51.200 added to DNSBL passed cache
[4;36;1mSQL (0.000246) [0;1mSET SQL_AUTO_IS_NULL=0
[4;35;1mWeb Load (0.000287) SELECT * FROM webs
[4;36;1mWeb Columns (0.000327) [0;1mSHOW FIELDS FROM webs
Reading page ''HomePage'' from web ''wiki''
[4;35;1mWeb Load (0.000299) SELECT * FROM webs WHERE
(webs.`address` = ''wiki'') LIMIT 1
[4;36;1mPage Load (0.000230) [0;1mSELECT * FROM pages WHERE
(pages.web_id = 1 AND (name = ''HomePage'')) LIMIT 1
Page ''HomePage'' found
[4;35;1mPage Columns (0.003023) SHOW FIELDS FROM pages
[4;36;1mRevision Load (0.000783) [0;1mSELECT * FROM
revisions WHERE (revisions.page_id = 1) ORDER BY id
Rendering statuslayoutfalseuse_full_pathtruefilewiki/page within layouts/default
Rendering wiki/page
[4;35;1mWeb Load (0.000597) SELECT * FROM webs WHERE
(webs.`id` = 1)
[4;36;1mRevision Columns (0.000602) [0;1mSHOW FIELDS FROM
revisions
[4;35;1mPage Load (0.000231) SELECT * FROM pages WHERE
(pages.`id` = 1)
[4;36;1mWeb Load (0.000265) [0;1mSELECT * FROM webs WHERE
(webs.`id` = 1)
[4;35;1mSQL (0.000320) SELECT count(*) AS count_all FROM
pages WHERE (web_id = 1 AND name = ''JavaScript'')
[4;36;1mRevision Load (0.000308) [0;1mSELECT * FROM
revisions WHERE (revisions.page_id = 1) ORDER BY id DESC LIMIT 1
[4;35;1mSQL (0.000207) SELECT count(*) AS count_all FROM
pages WHERE (web_id = 1 AND name = ''Jeff'')
[4;36;1mPage Load (0.000277) [0;1mSELECT * FROM pages WHERE
(pages.web_id = 1)
[4;35;1mSQL (0.000409) SELECT name FROM pages JOIN
wiki_references ON pages.id = wiki_references.page_id WHERE
wiki_references.referenced_name = ''HomePage'' AND
wiki_references.link_type in (''L'',''W'') AND
pages.web_id = ''1''
[4;36;1mSQL (0.000391) [0;1mSELECT name FROM pages JOIN
wiki_references ON pages.id = wiki_references.page_id WHERE
wiki_references.referenced_name = ''HomePage'' AND
wiki_references.link_type = ''I'' AND pages.web_id =
''1''
Rendered wiki/_inbound_links (0.18927)
Session #-609631828: remembered URL ''/wiki/show/HomePage''
Completed in 2.37347 (0 reqs/sec) | DB: 0.00880 (0%) | 200 OK
[http://docs.kogbox.com/wiki/show/HomePage]
Any thoughts?
On Sun, Aug 31, 2008 at 2:01 PM, Jeffrey Warren <jeff at vestaldesign.com>
wrote:>
> Hi, I encountered this error too, and i believe it has to do with a
>
> require ''cgi''
>
> line... there are two, one at /lib/wiki_content.rb and one at
/lib/chunks/wiki.rb
>
> Since rails (at least the /vendor/rails version) reassigns the Cookie class
to superclass DelegateClass in:
>
>
/vendor/rails/actionpack/lib/action_controller/cgi_ext/cgi_ext/cookie_performance_fix.rb
>
> I believe its not good practice to load require ''cgi''
again... since it tries to use the native Ruby version.
>
> Still, this is a bit beyond me. I tried using require_dependency, the
rails-specific version that loads it each time (only in development mode, it
seems), and no effect. I also tried following the require
''cgi'' with:
>
> require_dependency
''../vendor/rails/actionpack/lib/action_controller/cgi_ext/cgi_ext''
>
> in a last-ditch attempt to reassign the native Ruby Cookie class. Anyways
I''m pretty much in the dark on this one, but I notice that the same
error "superclass mismatch for class Cookie" was apparently an issue
in 0.12, as per this message:
>
> http://rubyforge.org/pipermail/instiki-devel/2007-October/000049.html
>
> And I notice that jmonteiro changed *all* the require_dependency calls to
simple require calls in /lib/wiki_content.rb to resolve this error, pre-0.13:
>
>
http://github.com/jmonteiro/instiki/commit/deae731fbeb201a1cbab1567d0859f109267320e
>
> However it seems that''s his own repo and that change
didn''t make it into trunk, since i don''t see it in my copy of
0.13.
>
> I''m running on a mongrel cluster at MediaTemple''s Grid
Server, where I hear people have gotten 0.11 running without trouble.
>
>
>
>
> From: 1tizio <1tizio <at> gmail.com>
> Subject: problem "superclass mismatch for class Cookie"
> Newsgroups: gmane.comp.web.wiki.instiki.devel
> Date: 2008-08-13 10:07:44 GMT (2 weeks, 4 days, 7 hours and 36 minutes ago)
>
> hi guys, I'' ve a problem with instiki version instiki-0.13.0, when
I access for creating a new page the application give me this message :
"superclass mismatch for class Cookie".
> What can I do for solving this problem?
>
> thank''s
> andrea
>
> _______________________________________________
> Instiki-devel mailing list
> Instiki-devel <at> rubyforge.org
> http://rubyforge.org/mailman/listinfo/instiki-devel