Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tried to load unspecified class: IPAddr #656

Open
ciscolive opened this issue Feb 12, 2023 · 0 comments
Open

Tried to load unspecified class: IPAddr #656

ciscolive opened this issue Feb 12, 2023 · 0 comments

Comments

@ciscolive
Copy link

ciscolive commented Feb 12, 2023

Hello, I upgraded a Rails app Rails 7.0.4.2, and saw this error when saving an audited record:

# table defined with inet column
def change
  create_table :devices do |t|
    # 基础属性
    t.string :sn, null: false, unique: true, comment: "序列号"
    t.string :name, comment: "设备名称"
    t.inet :ip, comment: "管理地址"
end

# model turn on audited, But saw Tried to load unspecified class: IPAddr. then turn off the audtied, It can working well
class Device < ApplicationRecord
  # 设备标签属性
  # acts_as_tagger
  # acts_as_taggable_on :tags

  # 数据库审计
  # 添加审计功能会提示 Tried to load unspecified class: IPAddr
  audited
end
/home/careline/.rvm/rubies/ruby-3.2.0/lib/ruby/3.2.0/psych/class_loader.rb:99:in `find': Tried to load unspecified class: IPAddr (Psych::DisallowedClass)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant