fahrio
unread,Aug 28, 2009, 9:05:32 AM8/28/09Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Sign in to report message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to Paperclip Plugin
Hello;
I installed the paperclip plugin and was able to use it locally. When
I configured it to work with amazon S3 I keep getting the NoSuchBucket
(The specified bucket does not exist) error. Paperclip documentation
states that the bucket will be created if it doesn't exist but clearly
something is going wrong in my case.
The code for the image.rb file with paperclip is as follows:
belongs_to :work
has_attached_file :photo, :styles => {:big => "612x1224>", :small =>
"180X360>", :thumb => "36x36#"},
:storage => 's3',
:s3_credentials => YAML.load_file("#{RAILS_ROOT}/
config/s3.yml")[RAILS_ENV],
:path =>
":attachment/:id/:style/:basename.:extension",
:bucket => 'my_unique_image_bucket'
attr_protected :photo_file_name, :photo_content_type, :photo_size
validates_attachment_presence :photo
validates_attachment_size :photo, :less_than => 3.megabytes
validates_attachment_content_type :photo, :content_type => ['image/
jpeg', 'image/png', 'image/gif']