Activestorage Blob失败Rails 7

发布于 2025-02-13 10:50:19 字数 439 浏览 0 评论 0 原文

我们正在使用Rails 7来创建文档,其中我们从 active_storage_blob 中存储文件,现在当我们迁移到Rails 7时,当我们启用键发电机SHA256时,它开始失败。

rails.application.config.active_support.key_generator_hash_hash_digest_class = openssl :: digest :: sha256

现在,文档命中此错误: nomethodeRor:nomethoderor:notethoderor:noteThiced for Nilcy for Nil:nilclass in > doc.file.blob

任何想法都将不胜感激。

We are using rails 7 to create documents where we store files from active_storage_blob, right now when we migrate to rails 7 it starts to fail when we enable a key generator SHA256.

Rails.application.config.active_support.key_generator_hash_digest_class = OpenSSL::Digest::SHA256

Now the documents hit this error: NoMethodError: undefined method blob for nil:NilClass in doc.file.blob

Any idea will be appreciated.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文