Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

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

Closed
lighthouse-import opened this Issue · 2 comments

2 participants

@lighthouse-import

Imported from Lighthouse. Original ticket at: http://rails.lighthouseapp.com/projects/8994/tickets/6177
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?

@MrJoy

I appear to be seeing this on 3.1.1 as well.

@MrJoy

Those who come here while trying to set up their Rails app to do evented I/O may find this link of some use: http://www.williambharding.com/blog/technology/rails-3-autoload-modules-and-classes-in-production/

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.