solidusio / solidus_paypal_braintree

⛔️ [Archived] Use solidus_braintree instead!
https://github.com/solidusio/solidus_braintree
BSD 3-Clause "New" or "Revised" License
37 stars 78 forks source link

ActiveRecord::SubclassNotFound #184

Closed gildardoperez closed 4 years ago

gildardoperez commented 6 years ago

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 commented 4 years ago

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.