Skip to content

Rails 8 support? #135

@KoellM

Description

@KoellM

升级到 Rails 8 之后出现错误

/home/deploy1/.rbenv/versions/3.3.6/lib/ruby/gems/3.3.0/gems/second_level_cache-2.7.1/lib/second_level_cache/active_record/belongs_to_association.rb:7:in `find_target': wrong number of arguments (given 1, expected 0) (ArgumentError)
        from /home/deploy1/.rbenv/versions/3.3.6/lib/ruby/gems/3.3.0/gems/activerecord-8.0.0/lib/active_record/associations/association.rb:190:in `load_target'
        from /home/deploy1/.rbenv/versions/3.3.6/lib/ruby/gems/3.3.0/gems/activerecord-8.0.0/lib/active_record/associations/association.rb:76:in `reload'
        from /home/deploy1/.rbenv/versions/3.3.6/lib/ruby/gems/3.3.0/gems/activerecord-8.0.0/lib/active_record/associations/singular_association.rb:11:in `reader'
        from /home/deploy1/.rbenv/versions/3.3.6/lib/ruby/gems/3.3.0/gems/activerecord-8.0.0/lib/active_record/associations/builder/association.rb:105:in `xml'

看起来是因为 Rails 8 新的异步关联加载 API
rails/rails@fe92250#diff-cac8ca279408e7447fa1f97443ec4c548a42a115c70349f7fa5e8ade10198a1cR240

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions