title: Ruby on Rails 3 : "superclass mismatch for class ..."
body: <p>Platform: Mac OSX 10.6</p>
  
  <p>In my terminal, i start the Ruby console with "rails c"</p>
  
  <p>While following the Ruby on Rails 3 tutorial to build a class:</p>
  
  <pre><code>class Word &lt; String 
    def palindrome? #check if a string is a palindrome
      self == self.reverse
    end
  end
  </code></pre>
  
  <p>i get the error message:</p>
  
  <pre><code>TypeError: superclass mismatch for class Word
      from (irb):33
      from /Users/matthew/.rvm/gems/ruby-1.9.2-p180@rails3tutorial/gems/railties-3.0.5/lib/rails/commands/console.rb:44:in `start'
      from /Users/matthew/.rvm/gems/ruby-1.9.2-p180@rails3tutorial/gems/railties-3.0.5/lib/rails/commands/console.rb:8:in `start'
      from /Users/matthew/.rvm/gems/ruby-1.9.2-p180@rails3tutorial/gems/railties-3.0.5/lib/rails/commands.rb:23:in `&lt;top (required)&gt;'
      from script/rails:6:in `require'
      from script/rails:6:in `&lt;main&gt;'
  </code></pre>
  
  <p>The tutorial shows that it has no problem and i know the code is fine; I've searched other related questions, but they all involved migrating from Ruby 2 to 3 or erb vs eruby.</p>