开发者

Amazon S3 configuration with Paperclip

I am trying to setup paperclip to post to my Amazon s3 account.

This is there error I get back:

LoadError in PostsControlle开发者_如何转开发r#create
no such file to load -- aws/s3 (You may need to install the aws-s3 gem)
Rails.root: /Users/tonybeninate/Documents/Apps/PhotoBlog

Post model

class Post < ActiveRecord::Base
# Paperclip
has_attached_file :photo,
:storage => :s3,
:path => "/:attachment/:id/:style/:filename",
:s3_credentials => Rails.root.join("config/s3.yml"),
:styles => {
  :thumb => "100x100#",
  :small => "150x150>",
  :large => "725x725" }
end

s3.yml (I replaced my key and secret key)

bucket: <%= ENV['tbhockeyboy'] || 'paperclip' %>
access_key_id: <%= ENV['my_access_key'] %>
secret_access_key: <%= ENV['my_secret_key'] %>

I do have the aws-s3 gem installed. Any thoughts?


Alternatively, try using

gem 'aws-sdk'

in your Gemfile and bundle install.


Did you get this fixed? Make sure you have

gem 'aws-s3'

in your Gemfile, and run bundle install.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜