在迁移到 rails 5 之前,它运行良好,但是当我迁移到 rails 5.1.1 时,它给我这样的错误
ActiveSupport::MessageVerifier::InvalidSignature: ActiveSupport::MessageVerifier::InvalidSignature
我使用的 key 与我们在以前版本的 Rails 中使用的 key 相同。
例如
crypt = ActiveSupport::MessageEncryptor.new(Rails.configuration.secret_key_base)
执行以下行后出现上述错误。
@password = crypt.decrypt_and_verify(User.last.encryptedpass)
最佳答案
在我的例子中,我将 undefined
(字符串)发送到 video
字段 (ActiveStorage)
关于ruby-on-rails - ActiveSupport::MessageVerifier::InvalidSignature: ActiveSupport::MessageVerifier::InvalidSignature 错误在 rails 5,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/47096688/