Skip to content

psych/class_loader.rb:99:in `find': Tried to load unspecified class: Gem::Specification (Psych::DisallowedClass) #1895

@jordansissel

Description

@jordansissel
  • When doing fpm -s gem -t deb rails
  • On Ruby versions 3.1.0 or newer

fpm tries to load a downloaded gem's metadata, it can fail with an error

psych/class_loader.rb:99:in `find': Tried to load unspecified class: Gem::Specification (Psych::DisallowedClass)

This seems to be a new failure caused by an upstream ruby or psych change. This ruby psych issue seems related: ruby/psych#487

The above ruby psych change mentions that safe_load is now the default (YAML.load is "safe_load") and the previous load method has been renamed unsafe_load.

Need to dig a bit more to figure out the best solution that does safe loading, but for now, calling unsafe_load when it's available is probably a short fix.

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