我正在尝试使用没有任何gem的Active Storage播种图像:
require 'uri'
@poi= Poi.find(1)
upload = "https://unsplash.com/photos/1ZT5j_yd0P4"
file = URI.open(upload)
@poi.photos.attach(io: file, filename: "#{@poi.id}-#{@poi.name.downcase.parameterize}.jpg")
我得到一个错误:
ActiveSupport :: MessageEncryptor :: InvalidMessage:ActiveSupport :: MessageEncryptor :: InvalidMessage
原因: OpenSSL :: Cipher :: CipherError: