ArgumentError with Rails 8.1
Nobody has claimed this yet.
Assessment
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 50/100
Research direction
Start at jsonapi/routing_ext.rb line 134 and compare its Resource call with the actionpack routing mapper initializer at Rails 8.1.3 line 1319. Reproduce the failure through config/routes.rb and rails app:update. Done means the task completes without the ArgumentError under Rails 8.1.3.
Written by the indexing model from the issue text.
Description
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. https://github.com/rails/rails/pull/53689
- Dominant language
- Ruby
- Stars
- 2.3k
- Forks
- 546
- PR merge metrics
- No merged PRs in 30d
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from JSONAPI-Resources/jsonapi-resources
-
Difficulty 1/5 Under an hour Newbie friendliness 85/100
-
Difficulty 4/5 3-5 days Newbie friendliness 42/100
JSONAPI-Resources/jsonapi-resources#1479 · 2 comments ·
-
Difficulty 4/5 3-5 days Newbie friendliness 30/100
JSONAPI-Resources/jsonapi-resources#1477 · 3 comments · 1 reaction ·
-
Difficulty 3/5 1-2 days Newbie friendliness 45/100
-
Difficulty 4/5 3-5 days Newbie friendliness 45/100
JSONAPI-Resources/jsonapi-resources#1473 · 1 comment ·
All issues in JSONAPI-Resources/jsonapi-resources
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
simp/pupmod-simp-simp#395 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 80/100
simp/pupmod-simp-rsyslog#219 ·
-
Difficulty 1/5 Under an hour Newbie friendliness 90/100
simp/pupmod-simp-pupmod#256 ·
-
Difficulty 1/5 Under an hour Newbie friendliness 90/100
simp/pupmod-simp-sudo#150 ·
-
Difficulty 1/5 Under an hour Newbie friendliness 90/100