Skip to content

Psych::DisallowedClass (Tried to load unspecified class: Time): #604

@azeemh

Description

@azeemh

ruby 3.2
rails 7.04
ubuntu 22.10 (shouldn't matter but i hate when people give mac specific solutions)

even with gem 'psych', '~> 5.0.1' in my gemfile

none of the following lines in my ror application.rb will work (i tried them one at a time but including all for completeness.)


    config.active_record.yaml_column_permitted_classes = [Time]
    config.active_record.yaml_column_permitted_classes = [ActiveSupport::HashWithIndifferentAccess]
    config.active_record.yaml_column_permitted_classes = [Symbol, Date, Time]

please advise because now I have to pin to gem 'psych', '~> 3.3.0' in my gemfile which bundle gives me 3.3.4 and everything works.

why did you guys forget to add support for dates and times? that's like the most basic thing and it broke everything.

please add symbols dates and times as default permitted classes in the gem, or please inform the relevant area (file and line in the codebase) so I or anyone else with the same issue can make a pull release that fixes if nobody else will?

thank you.

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