You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Request for support. Note: Please try to avoid submitting issues for support requests. Use Gitter instead.
Checklist before submitting:
I've searched for an existing issue.
I've NOT asked my question on Gitter because Gitter seems to be abandoned by the core team. There a lots of questions posted there that have no responses at all.
I've included a complete bug report template. This step helps us and allows us to see the bug without trying to reproduce the problem from your description. It helps you because you will frequently detect if it's a problem specific to your project.
The feature I'm asking for is compliant with the JSON:API spec.
Description
In trying to update to Rails 7.1 I'm running into random instances of this error when running my test suite.
I also noticed that these errors were only happening locally, and not in CI, and so I tried setting config.eager_load = true in config/environments/test.rb which also made the errors go away.
I poked around this gem a little bit and I think that this block of code isn't exactly working as expected in Rail 7.1.
For anyone else that runs across this it's worth mentioning that another possible app-side fix is manually requiring ResourceController before using it.
This issue is a (choose one):
Checklist before submitting:
Description
In trying to update to Rails 7.1 I'm running into random instances of this error when running my test suite.
Sometimes there will be 2 of them, other times 20 or 30.
Via some trial and error I discovered that if I alter my
BaseController
to look like this:Instead of this:
then the random errors go away.
I also noticed that these errors were only happening locally, and not in CI, and so I tried setting
config.eager_load = true
inconfig/environments/test.rb
which also made the errors go away.I poked around this gem a little bit and I think that this block of code isn't exactly working as expected in Rail 7.1.
jsonapi-resources/lib/jsonapi-resources.rb
Lines 12 to 18 in e92afc6
Ruby: 3.3.6
Rails: 7.1.5.1
The text was updated successfully, but these errors were encountered: