Hacktoberfest 2026: những issue maintainer đã đánh dấu cho tháng Mười, đang mở và phù hợp người mới. Xem issue Hacktoberfest

ArgumentError with Rails 8.1

Đang mở
#1,488 1 bình luận 0 reaction 0 người được giao Xem trên GitHub

Chưa có ai nhận issue này.

Đánh giá

Độ khó
3/5
Thời gian dự kiến
1-2 ngày
Mức phù hợp với người mới
50/100
Loại issue
Lỗi
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Ít trao đổi
Công nghệ
rails, ruby
Lĩnh vực
api, backend

Hướng nghiên cứu

Bắt đầu tại dòng 134 của jsonapi/routing_ext.rb và so sánh lệnh gọi Resource của nó với initializer của actionpack routing mapper tại dòng 1319 của Rails 8.1.3. Tái hiện lỗi thông qua config/routes.rb và rails app:update. Công việc được xem là hoàn tất khi tác vụ hoàn thành mà không có ArgumentError trên Rails 8.1.3.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

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

Ngôn ngữ chính
Ruby
Star
2.3k
Fork
546
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Hướng dẫn đóng góp

Chưa lập chỉ mục được hướng dẫn đóng góp cho kho mã nguồn này

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của JSONAPI-Resources/jsonapi-resources

Tất cả issue của JSONAPI-Resources/jsonapi-resources

Issue tương tự

Thêm issue về Ruby

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.