Closed Ex-Ark closed 3 years ago
After some test it is confirmed in my case that regressing from 5.0
to warden-jwt_auth, '0.4.2'
fixes this specific issue.
So it might indeed come from the change linked above or other changes made between these two versions.
Sorry for the late response. I'm quite busy at the moment, but I'll try to find some time for it. Meanwhile, if you come with a fix don't hesitate to give me some feedback or submit a PR. Thanks!
After some test it is confirmed in my case that regressing from
5.0
towarden-jwt_auth, '0.4.2'
fixes this specific issue. So it might indeed come from the change linked above or other changes made between these two versions.
I can also confirm that after regressing fixes the issue.
I've encountered a similar issue in my project. Any change in the code caused an exception:
A copy of XXX has been removed from the module tree but is still active
- XXX were different ActiveRecord models.
Regressing the version from 5.0
to 0.4.2
resolved the issue.
Closing in favor of https://github.com/waiting-for-dev/devise-jwt/pull/186
On code reloading, warden-jwt raises an invalid STI Subclass not found error when code is reloaded
ActiveRecord::SubclassNotFound (Invalid single-table inheritance type: SuperUser is not a subclass of User)
Problem first seen here : https://github.com/waiting-for-dev/devise-jwt/issues/22
Was fixed in warden-jwt_auth here some time ago (0.4.4) : https://github.com/waiting-for-dev/warden-jwt_auth/pull/11
Changes were done in recent update (0.5.0) : https://github.com/waiting-for-dev/warden-jwt_auth/commit/a3e57330a503ecd098d3f3a5b3eeb622eef4bf84
lines that seemed to fix the issue were removed :
Expected behavior
We shouldn't have to fully reboot the app when developing. It shouldn't raise invalid STI error after code reloading
Actual behavior
ActiveRecord::SubclassNotFound (Invalid single-table inheritance type: SuperUser is not a subclass of User):
is raisedSteps to Reproduce the Problem
before_action: :authenticate_user!
)Debugging information