简体   繁体   English

需要实现#cache! 如果你想使用 Cloudinary::CarrierWave::Storage 作为缓存存储

[英]Need to implement #cache! if you want to use Cloudinary::CarrierWave::Storage as cache storage

Need to implement #cache!需要实现#cache! if you want to use Cloudinary::CarrierWave::Storage as cache storage.如果你想使用 Cloudinary::CarrierWave::Storage 作为缓存存储。 I am facing this issue to uploading an image for our blog in ruby on rails.我在用 ruby​​ on rails 为我们的博客上传图片时遇到了这个问题。 Please tell me how I am Fix this Issue.请告诉我我是如何解决这个问题的。 Backbenchersstudy后座研究

Cloudinary is currently not indented to be used as cache storage. Cloudinary 目前没有缩进用作缓存存储。 However, as part of CarrierWave 2.0 updates here , the behaviour was changed so that the default cache storage is now configured to be the same as the regular upload hence the error.然而,随着2.0的更新CarrierWave的一部分在这里,行为已更改,这样默认的缓存存储现在配置是一样的定时上传因此错误。

You can use the below configuration to set the cache storage to file instead of it trying to use Cloudinary.您可以使用以下配置将缓存存储设置为文件,而不是尝试使用 Cloudinary。

CarrierWave.configure do |config|
  config.cache_storage = :file
end

Related thread: https://github.com/cloudinary/cloudinary_gem/issues/344相关主题: https : //github.com/cloudinary/cloudinary_gem/issues/344

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM