我在Heroku,这是一个投资组合的东西,我在github上为潜在的雇主看,所以显然我不'不想将我的密钥粘贴在S3.yml文件中。我已经将Heroku和我的机器上的S3_KEY和S3_SECRET导出到我的环境中,并且ruby可以访问它们。但是,当我尝试上传,它给了我下面的错误:AWS :: S3 :: MissingAccessKey回形针,但我已经定义了两个
AWS::S3::MissingAccessKey in Portfolio itemsController#update
You did not provide both required access keys. Please provide the access_key_id and the secret_access_key.
跟踪是除了我的控制线#,直到我试着上传文件,工作正常无关。这里是我有什么:
class Asset < ActiveRecord::Base
attr_accessible :image, :image_file_name, :image_content_type, :image_file_size, :portfolio_item_id, :order
has_attached_file :image,
:styles => {
:thumb => "100x100#",
:small => "300x300",
:large => "600x600>"
},
:storage => :s3,
:s3_credentials => {
:access_key_id => ENV["S3_KEY"],
:secret_access_key => ENV["S3_SECRET"]
},
:bucket => "bucketybucket",
:path => "portfolio"
end
任何人都知道这是怎么回事?我如何构造这个散列错误?
哦,而且我是按照这个线程,没有骰子:Paperclip and Amazon S3 Issue
有这个完全相同的问题......你能解决这个问题吗? – 2011-08-19 00:19:48