We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
I'm using the ActiveRecord::Encryption on column email and got this issue. Please help me to the right config Thanks,
email
Unable to annotate app/models/user.rb: ActiveRecord::Encryption::Errors::Decryption /Users/phuoctu/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/activerecord-7.0.3.1/lib/active_record/encryption/encryptor.rb:58:in `rescue in decrypt' /Users/phuoctu/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/activerecord-7.0.3.1/lib/active_record/encryption/encryptor.rb:52:in `decrypt' /Users/phuoctu/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/activerecord-7.0.3.1/lib/active_record/encryption/encrypted_attribute_type.rb:73:in `block in decrypt' /Users/phuoctu/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/activerecord-7.0.3.1/lib/active_record/encryption/scheme.rb:67:in `with_context' /Users/phuoctu/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/activerecord-7.0.3.1/lib/active_record/encryption/encrypted_attribute_type.rb:15:in `with_context' /Users/phuoctu/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/activerecord-7.0.3.1/lib/active_record/encryption/encrypted_attribute_type.rb:72:in `decrypt' /Users/phuoctu/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/activerecord-7.0.3.1/lib/active_record/encryption/encrypted_attribute_type.rb:31:in `deserialize' /Users/phuoctu/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/activemodel-7.0.3.1/lib/active_model/attribute.rb:168:in `type_cast' /Users/phuoctu/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/activemodel-7.0.3.1/lib/active_model/attribute.rb:43:in `value' /Users/phuoctu/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/activemodel-7.0.3.1/lib/active_model/attribute_set.rb:33:in `block in to_hash' /Users/phuoctu/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/activesupport-7.0.3.1/lib/active_support/core_ext/enumerable.rb:129:in `block in index_with' /Users/phuoctu/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/activesupport-7.0.3.1/lib/active_support/core_ext/enumerable.rb:129:in `each' /Users/phuoctu/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/activesupport-7.0.3.1/lib/active_support/core_ext/enumerable.rb:129:in `index_with' /Users/phuoctu/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/activemodel-7.0.3.1/lib/active_model/attribute_set.rb:33:in `to_hash' /Users/phuoctu/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/activerecord-7.0.3.1/lib/active_record/model_schema.rb:471:in `column_defaults' /Users/phuoctu/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/annotate-3.2.0/lib/annotate/annotate_models.rb:115:in `schema_default' /Users/phuoctu/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/annotate-3.2.0/lib/annotate/annotate_models.rb:867:in `get_attributes' /Users/phuoctu/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/annotate-3.2.0/lib/annotate/annotate_models.rb:151:in `block in get_schema_info' /Users/phuoctu/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/annotate-3.2.0/lib/annotate/annotate_models.rb:149:in `each' /Users/phuoctu/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/annotate-3.2.0/lib/annotate/annotate_models.rb:149:in `get_schema_info' /Users/phuoctu/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/annotate-3.2.0/lib/annotate/annotate_models.rb:481:in `annotate' /Users/phuoctu/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/annotate-3.2.0/lib/annotate/annotate_models.rb:682:in `annotate_model_file' /Users/phuoctu/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/annotate-3.2.0/lib/annotate/annotate_models.rb:658:in `block in do_annotations' /Users/phuoctu/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/annotate-3.2.0/lib/annotate/annotate_models.rb:657:in `each' /Users/phuoctu/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/annotate-3.2.0/lib/annotate/annotate_models.rb:657:in `do_annotations' /Users/phuoctu/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/annotate-3.2.0/bin/annotate:31:in `<top (required)>' /Users/phuoctu/.rbenv/versions/3.1.2/bin/annotate:25:in `load' /Users/phuoctu/.rbenv/versions/3.1.2/bin/annotate:25:in `<main>' Unable to annotate app/models/user.rb: no implicit conversion of nil into Array /Users/phuoctu/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/annotate-3.2.0/lib/annotate/annotate_models.rb:682:in `concat' /Users/phuoctu/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/annotate-3.2.0/lib/annotate/annotate_models.rb:682:in `annotate_model_file' /Users/phuoctu/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/annotate-3.2.0/lib/annotate/annotate_models.rb:658:in `block in do_annotations' /Users/phuoctu/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/annotate-3.2.0/lib/annotate/annotate_models.rb:657:in `each' /Users/phuoctu/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/annotate-3.2.0/lib/annotate/annotate_models.rb:657:in `do_annotations' /Users/phuoctu/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/annotate-3.2.0/bin/annotate:31:in `<top (required)>' /Users/phuoctu/.rbenv/versions/3.1.2/bin/annotate:25:in `load' /Users/phuoctu/.rbenv/versions/3.1.2/bin/annotate:25:in `<main>' Model files unchanged.
The text was updated successfully, but these errors were encountered:
+1
Sorry, something went wrong.
I had this issue and for me it was because I had set a default value of "" to my encrypted column. Changing the type from:
""
t.string :error_message, null: false, default: ''
To:
t.string :error_message
solved it for me.
This might be an issue with ActiveRecord::Encryption but more investigation would be required.
I have this problem too. It looks to me like a Rails upgrade will fix it. There is a fix for encrypted column defaults in Rails v7.1.1.
No branches or pull requests
I'm using the ActiveRecord::Encryption on column
email
and got this issue. Please help me to the right configThanks,
Commands
Version
The text was updated successfully, but these errors were encountered: