【发布时间】:2012-07-02 00:26:42
【问题描述】:
我正在尝试设置回形针以发布到我的 Amazon s3 帐户。
这是我返回的错误:
LoadError in PostsController#create
no such file to load -- aws/s3 (You may need to install the aws-s3 gem)
Rails.root: /Users/tonybeninate/Documents/Apps/PhotoBlog
后模型
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(我替换了我的密钥和密钥)
bucket: <%= ENV['tbhockeyboy'] || 'paperclip' %>
access_key_id: <%= ENV['my_access_key'] %>
secret_access_key: <%= ENV['my_secret_key'] %>
我确实安装了 aws-s3 gem。有什么想法吗?
【问题讨论】: