Skip to content

Tried to load unspecified class: Time #99

Description

@nitesh-jobvite

Tried to load unspecified class: Time

E, [2024-02-20T07:57:41.217929 #7] ERROR -- : ["/usr/local/lib/ruby/3.2.0/psych/class_loader.rb:99:in find'\", \"/usr/local/lib/ruby/3.2.0/psych/class_loader.rb:28:in load'", "/usr/local/lib/ruby/3.2.0/psych/scalar_scanner.rb:116:in parse_time'\", \"/usr/local/lib/ruby/3.2.0/psych/scalar_scanner.rb:59:in tokenize'", "/usr/local/lib/ruby/3.2.0/psych/visitors/to_ruby.rb:65:in deserialize'\", \"/usr/local/lib/ruby/3.2.0/psych/visitors/to_ruby.rb:130:in visit_Psych_Nodes_Scalar'", "/usr/local/lib/ruby/3.2.0/psych/visitors/visitor.rb:30:in visit'\", \"/usr/local/lib/ruby/3.2.0/psych/visitors/visitor.rb:6:in accept'", "/usr/local/lib/ruby/3.2.0/psych/visitors/to_ruby.rb:35:in accept'\", \"/usr/local/lib/ruby/3.2.0/psych/visitors/to_ruby.rb:320:in visit_Psych_Nodes_Document'", "/usr/local/lib/ruby/3.2.0/psych/visitors/visitor.rb:30:in visit'\", \"/usr/local/lib/ruby/3.2.0/psych/visitors/visitor.rb:6:in accept'", "/usr/local/lib/ruby/3.2.0/psych/visitors/to_ruby.rb:35:in accept'\", \"/usr/local/lib/ruby/3.2.0/psych.rb:334:in safe_load'", "/usr/local/lib/ruby/3.2.0/psych.rb:369:in load'\", \"/mnt/talemetry_match_api/vendor/ruby/3.2.0/gems/rubycas-client-2.3.9/lib/casclient/responses.rb:96:in parse_extra_attribute_value'", "/mnt/talemetry_match_api/vendor/ruby/3.2.0/gems/rubycas-client-2.3.9/lib/casclient/responses.rb:80:in block in parse'\", \"/mnt/talemetry_match_api/vendor/ruby/3.2.0/gems/rubycas-client-2.3.9/lib/casclient/responses.rb:79:in each'", "/mnt/talemetry_match_api/vendor/ruby/3.2.0/gems/rubycas-client-2.3.9/lib/casclient/responses.rb:79:in parse'\", \"/mnt/talemetry_match_api/vendor/ruby/3.2.0/gems/rubycas-client-2.3.9/lib/casclient/responses.rb:35:in initialize'", "/mnt/talemetry_match_api/vendor/ruby/3.2.0/gems/rubycas-client-2.3.9/lib/casclient/client.rb:265:in new'\", \"/mnt/talemetry_match_api/vendor/ruby/3.2.0/gems/rubycas-client-2.3.9/lib/casclient/client.rb:265:in request_cas_response'", "/mnt/talemetry_match_api/vendor/ruby/3.2.0/gems/rubycas-client-2.3.9/lib/casclient/client.rb:123:in validate_service_ticket'\", \"/mnt/talemetry_match_api/lib/cas_authenticator.rb:7:in validate_ticket'", "/mnt/talemetry_match_api/lib/cas_authenticator.rb:12:in `validate_credentials'", ]

parse_extra_attribute_value method in the lib/casclient/responses.rb is using YAML.load(value). With ruby 3.2 we have to explicitly specify the classes with YAML.load

Example - YAML.load_file(some_file_name, permitted_classes: [Matrix, OpenStruct, Symbol, Time])

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