Skip to content

Error: Tried to load unspecified class Psych::DisallowedClass of a model #388

@palhimalaya

Description

@palhimalaya

Note: Quote is my model name.

After upgrading from Rails 5 to Rails 6 and from Ruby 2.3 to Ruby 3, I encountered an error. The error message indicates an issue with loading an unspecified class Quote. Below are the details of the error and the relevant part of the code:

pry(#<#<Class:0x000061b9016dd758>>)> activity.parameters
Psych::DisallowedClass: Tried to load unspecified class: Quote
from /home/cosine/.rbenv/versions/3.0.2/lib/ruby/3.0.0/psych/class_loader.rb:99:in `find'
[2] pry(#<#<Class:0x000061b9016dd758>>)> activity
=> #<PublicActivity::Activity:0x000061b901421898
 id: 272678,
 trackable_type: "Quote",
 trackable_id: 28253,
 owner_type: "User",
 owner_id: 48,
 key: "activity.quote.project_details_updated",
 parameters: #<PublicActivity::Activity:0x12fd4>
[3] pry(#<#<Class:0x000061b9016dd758>>)> 

Metadata

Metadata

Assignees

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