I have application which is deployed to heroku using amazon s3 posting images to buckets.This works perfectly fine. But when fetching same image it gives error:
Including given code in config/initializers/paper_clip.rb resolved my problem.
Paperclip::Attachment.default_options.merge!( :url => ':s3_domain_url', :path => 'app/public/:class/:attachment/:id_partition/:style/:filename' )