This error will happen if you've already declared class User
elsewhere first in your code:
1.9.3-p374 :001 > class Bar; end
=> nil
1.9.3-p374 :002 > class Foo; end # first declaration, no superclass
=> nil
1.9.3-p374 :003 > class Foo < Bar; end # attempting to declare superclass later
TypeError: superclass mismatch for class Foo
from (irb):3
from /Users/Mark/.rvm/rubies/ruby-1.9.3-p374/bin/irb:16:in `<main>'
vs.
1.9.3-p374 :001 > class Bar; end
=> nil
1.9.3-p374 :002 > class Foo < Bar; end # first declaration, including superclass
=> nil
1.9.3-p374 :003 > class Foo; end # don't have to mention the superclass later
=> nil
This can be difficult to track down sometimes, but an easy starting point would be to search your entire project for "class User".