My rails app works great in development. In production I get the following error when launching the app at Heroku:
It references a helper method I defined:
def image_for(movie)
if movie.image.exists?
image_tag(movie.image.url)
else
image_tag('placeholder.png')
end
end
This started after installing the paperclip gem but it doesn't happen in development. Does anyone know how to fix this error. My next step is to install an older version of the gem but I wanted some advice first. Thanks for reading.
Did you put gem 'aws-sdk' in your Gemfile ? It seems Rails can not find Paperclip::Storage::S3::AWS which is provided by aws-sdk gem.
我通过降级AWS-SDK gem修复了此错误:gem'aws-sdk','<2.0'
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.