<p>I've just updated my ruby installation on my gentoo server to ruby 1.8.6 patchlevel 287 and have started getting an error on one of my eRuby apps. The error given in the apache error_log file is:</p>

<pre><code>[error] mod_ruby: /usr/lib/ruby/1.8/cgi.rb:774: superclass mismatch for class Cookie (TypeError)
</code></pre>

<p>The strange thing is that it seems to work sometimes - but other times I get that error. Anyone any ideas?</p>

That error shows up when you redeclare a class that’s already been declared, most likely because you’re loading two different copies of cgi.rb. See a
similar issue in Rails
.