amazon s3+paperclip - AWS::S3::NoSuchBucket
I’ve used Uploadify and paperclip in Rails3 and I’m getting this error -
AWS::S3::NoSuchBucket (The specified bucket does not exist):
app/controllers/cards_controller.rb:79:in `create'
app/controllers/cards_controller.rb:78:in `create'
app/middleware/flash_session_cookie_middleware.rb开发者_Python百科:16:in `call'
My s3.yml file is
————————————————–
development: bucket: bucket-dev access_key_id: ### secret_access_key: ### test: bucket: bucket-test access_key_id: ### secret_access_key: ### production: bucket: bucket-pro access_key_id:### secret_access_key: ###
————————————————–
and the model has -
————————————————–
has_attached_file :photo,
:storage => :s3,
:s3_credentials => “#{::Rails.root.to_s}/config/s3.yml”,
:path => “/:style/:filename”,
:styles => {:medium => “300×300>”,:thumb => “100×100>”}
————————————————–
Safalmj, do you have buckets created on S3 called 'bucket-test' and 'bucket-pro'? If not, sign into the AWS Console and create them first.
Wow. I was just having this very same issue. Then I read something about Paperclip creating buckets where they don't exist. I appended a 1 to the end of my already created bucket name, and all of a sudden it worked. I think it might have something to do with the other end. Try setting the bucket name to something other than the one you've probably already created... Highly counter intuitive...
加载中,请稍侯......
精彩评论