Skip to content


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP


The single-table inheritance mechanism failed to locate the subclass #788

lighthouse-import opened this Issue · 2 comments

2 participants


Imported from Lighthouse. Original ticket at:
Created by Greg Hazel - 2011-02-19 09:28:12 UTC

Running with config.threadsafe! and mysql2 on Rails 2.3.10 I got this:

The single-table inheritance mechanism failed to locate the subclass: 'MySubClass'. This error is raised because the
column 'type' is reserved for storing the class in case of inheritance. Please rename this column if you didn't intend
it to be used for storing the inheritance class or overwrite MyParentClass.inheritance_column to use another column for
that information.

However the type column is being used properly, both classes exist in the correct files, and this action works 99.99% of the time. Once though, I saw this failure (I've been running with config.threadsafe! for about a day and mysql2 a few hours, otherwise the app has been running for a Long Time).

Is ActiveRecord::Base#compute_type (and/or the rest of the inheritance system) really threadsafe?


I appear to be seeing this on 3.1.1 as well.


Those who come here while trying to set up their Rails app to do evented I/O may find this link of some use:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.