Skip to content

Getting invalid status code in Rails 8.0.2 #1477

Description

@prabha1988

Hi team,

I’m using jsonapi-resources in a Rails application that we’re upgrading to Rails 8 (Ruby 3.3.x).

With versions 0.9.12 and 0.10.1, basic CRUD operations work, but error handling and validation responses are broken — for example, validation errors return status 0 instead of 422, and ActionController::ForceSSL raises uninitialized constant errors since it’s no longer included in Rails 8.

Could you please confirm if Rails 8 compatibility is planned, or if there’s an active branch/fork that supports newer Rails versions?

Thanks for maintaining this great gem!

Activity

  1. takaokouji commented on Nov 10, 2025

    @takaokouji
    Contributor

    We try to fix it, so please try it: speee#1 .

    Sorry, our modificaitons are includes setting for Claude Code, Docker (docker compose). We are currently testing the modifications. Once testing is complete, we plan to create a PR with those excluded.

  2. prabha1988 commented on Nov 12, 2025

    @prabha1988
    Author

    Thanks for the update! 👍
    Got it — I’ll try out speee#1 and verify on my side.

  3. takaokouji commented on Jan 21, 2026

    @takaokouji
    Contributor

    We've addressed the ActionController::ForceSSL compatibility issue in the speee fork.

    Fixed Issue: ActionController::ForceSSL was removed in Rails 8.0, causing uninitialized constant errors.

    Solution: Added proper existence checking before including the ForceSSL module:

    Test Results on Rails 8.0.4:

    • ✅ No ForceSSL NameError
    • ✅ Resource tests pass
    • ✅ Validation tests correctly return 422 status code

    Note on validation status code issue: We could not reproduce the "status 0" problem. All our validation tests correctly return 422 on Rails 8.0.4. This may have been fixed in other changes, or may require specific reproduction steps. If you have a reproducible test case, please share it.

    If you'd like to try the speee fork with Rails 8.0 support:

  4. added a commit that references this issue on Jan 21, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions