I am using Paperclip with Imagemagick in my application using Amazon S3 for storage. Everything works great in development. But in Heroku production, it doesn’t work properly.
The image is uploaded to Amazon S3, and sketching works, so the compilation part of Paperclip, Imagemagick, and S3 works fine. But for some reason, the fields of a specific paper clip model are not populated:
imagestore_file_name:
imagestore_content_type:
imagestore_file_size:
imagestore_updated_at:
In development, they are all populated, but not produced on Heroku. When I try to display the image in a working application (Heroku), it says that it is missing, although it is definitely present on S3. What can cause this error? Thanks for reading.
More details:
ruby 1.8.7
Rails 3.0.1
Stack: bamboo-mri-1.9.2
EDIT:
. Image Media, ActiveRecord:: Base.
class Image < Media
attr_accessor :imagestore_file_name
attr_accessor :imagestore_content_type
attr_accessor :imagestore_file_size
attr_accessor :imagestore_updated_at
has_attached_file :imagestore,
:storage => :s3,
:s3_credentials => "#{RAILS_ROOT}/config/amazon_s3.yml",
:path => "/:style/:filename",
:styles => { :medium => "800", :thumb => "150" }
end
( , )
Parameters: {"authenticity_token"=>"a9+UnIlVH5HRetoN45IlGlGYoeEkpqQ1Qskpe4EGuHw=", "media_input"=>"", "imagestore"=>#<File:/home/slugs/44ca6411-6e76-4e7d-8239-a956dc3979c0/mnt/tmp/RackMultipart20110110-17158-10fuv0p>, "type"=>"uber", "name"=>"Star Wars", "detail"=>""}
[paperclip] identify -format %wx%h '/home/slugs/44ca6411-6e76-4e7d-8239-a956dc3979c0/mnt/tmp/stream20110110-17158-1uyk3if.jpg[0]' 2>/dev/null
[paperclip] convert '/home/slugs/44ca6411-6e76-4e7d-8239-a956dc3979c0/mnt/tmp/stream20110110-17158-1uyk3if.jpg[0]' -resize "800" '/home/slugs/44ca6411-6e76-4e7d-8239-a956dc3979c0/mnt/tmp/stream20110110-17158-1uyk3if20110110-17158-ta9egy' 2>/dev/null
[paperclip] identify -format %wx%h '/home/slugs/44ca6411-6e76-4e7d-8239-a956dc3979c0/mnt/tmp/stream20110110-17158-1uyk3if.jpg[0]' 2>/dev/null
[paperclip] convert '/home/slugs/44ca6411-6e76-4e7d-8239-a956dc3979c0/mnt/tmp/stream20110110-17158-1uyk3if.jpg[0]' -resize "150" '/home/slugs/44ca6411-6e76-4e7d-8239-a956dc3979c0/mnt/tmp/stream20110110-17158-1uyk3if20110110-17158-13448fs' 2>/dev/null
[paperclip] Saving attachments.
[paperclip] saving /original/starWarsart2.jpg
[paperclip] saving /medium/starWarsart2.jpg
[paperclip] saving /thumb/starWarsart2.jpg
[paperclip] Saving attachments.
Redirected to !!my site url is here!!
Completed 302 Found in 1029ms
:
imagestore_file_name:
imagestore_content_type:
imagestore_file_size:
imagestore_updated_at:
, . . .