As the error message says, there is an opening of the Cookie class somewhere in the code that is using a different superclass than the one used in a prior definition or opening of the Cookie class.
Even a class definition that does not explicitly specify a superclass still has a superclass:
class Cookie
end
This defines the Cookie class with the superclass of Object.
I've encountered this error before, and it will occur when you have some code trying to reopen a class without specifying the superclass, and the programmer's assumption is that the class (in this case, Cookie) has already been defined, and that he is simply reopening it to add some functionality. But if the reopening and the definition are in reverse order, you'll get that error because the class will already have been defined as a subclass of Object, but is trying to be redefined or reopened with a different superclass. Try this in irb:
% irb
irb(main):001:0> class C < String; end
=> nil
irb(main):002:0> class C; end
=> nil
irb(main):003:0> exit
% irb
irb(main):001:0> class C; end
=> nil
irb(main):002:0> class C < String; end
TypeError: superclass mismatch for class C
from (irb):2
So, you probably just have to grep for definitions of the Cookie class and try to ensure files are always being require-d in the correct order. This may or may not be easy. :)