Skip to content
This repository has been archived by the owner on Apr 14, 2023. It is now read-only.

ActiveRecord::SubclassNotFound #184

Closed
gildardoperez opened this issue Aug 26, 2018 · 1 comment
Closed

ActiveRecord::SubclassNotFound #184

gildardoperez opened this issue Aug 26, 2018 · 1 comment

Comments

@gildardoperez
Copy link

gildardoperez commented Aug 26, 2018

I decided to delete solidus_paypal_braintree gem and used solidus_stripe instead but every time I tried to add a new payment from the Admin my production error logs keeps showing this error and preventing me from adding a new payment gateways:

ActiveRecord::SubclassNotFound (The single-table inheritance mechanism failed to locate the subclass: 'Solidus::Gateway::BraintreeGateway'. 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 Spree::PaymentMethod.inheritance_column to use another column for that information.)

SOLUTION:
> rails console
irb> ActiveRecord::Base.connection.execute("DELETE FROM spree_payment_methods WHERE type='Solidus::Gateway::BraintreeGateway'")

@kennyadsl
Copy link
Member

Closing, this should be because the old payment method was still there and referencing to a non-existent class. This should be fixed in core if there is a solution to this problem.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants