Skip to content

ArgumentError with Rails 8.1 #1488

@jagthedrummer

Description

@jagthedrummer

I'm trying to update my app to Rails 8.1.3 and when I run the rails app:update task it fails part way through with this error:

        ...
        skip  bin/setup
       rails  active_storage:update
bin/rails aborted!
ArgumentError: wrong number of arguments (given 4, expected 3) (ArgumentError)

    caller: /Users/jgreen/.asdf/installs/ruby/4.0.3/lib/ruby/gems/4.0.0/gems/jsonapi-resources-0.10.7/lib/jsonapi/routing_ext.rb:134
    |               jsonapi_resource_scope(Resource.new(@resource_type, api_only?, @scope[:shallow], options), @resource_type) do
                                                   ^^^^
    callee: /Users/jgreen/.asdf/installs/ruby/4.0.3/lib/ruby/gems/4.0.0/gems/actionpack-8.1.3/lib/action_dispatch/routing/mapper.rb:1319
    |           def initialize(entities, api_only, shallow, only: nil, except: nil, **options)
                    ^^^^^^^^^^
/Users/jgreen/projects/seshy-api/config/routes.rb:14:in 'block (3 levels) in <compiled>'
/Users/jgreen/projects/seshy-api/config/routes.rb:10:in 'block (2 levels) in <compiled>'
/Users/jgreen/projects/seshy-api/config/routes.rb:9:in 'block in <compiled>'
/Users/jgreen/projects/seshy-api/config/routes.rb:1:in '<compiled>'
/Users/jgreen/projects/seshy-api/config/environment.rb:5:in '<compiled>'
Tasks: TOP => active_storage:update => environment
(See full trace by running task with --trace)

It looks like this is the PR responsible for the change on the rails side. rails/rails#53689

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions