Skip to content

YAML aliases with Ruby 3.1 #690

Description

@jacobat

When trying to use DatabaseCleaner 2.0.0 with Ruby 3.1 and a database.yml file containing aliases I get this error:

Psych::BadAlias:
  Unknown alias: default

lib/database_cleaner/active_record/base.rb:49:in `load_config'

The YAML loading in Ruby 3.1 no longer supports aliases in YAML by default.

Further information and examples:
https://bugs.ruby-lang.org/issues/17866
rails/rails@179d0a1
sidekiq/sidekiq#5141

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