2012-04-20 8 views
2

Paperclip + S3はローカルマシンで動作しますが、Herokuでは動作しません。それは言う"AWS :: S3 ::エラー:: SignatureDoesNotMatch"Heroku Paperclip S3エラー=> AWS :: S3 ::エラー:: SignatureDoesNotMatch

2012-04-20T21:24:37 + 00:00アプリ[web.1]:パラメータ:{ "UTF8" => "organisation_id" => "1"、 "content" = "{" title = ""} "、" organisation_id "=>"Γ£ô "、 " authenticit y_token "=>" MHt20N64y9L24Ga2y6gGj8hX06U + td17XIRdqMadcCQ = "、 " > "weeqw"、 "attachments_attributes" => {"0" => {"pic" =>#>}}} "コミット" => "投稿を作成"} 2012-04-20T21:24:41 +00:00 app [web.1]: 344 6ms内に500内部サーバーエラーが発生しました 2012-04-20T21:24:41 + 00:00 app [web.1]:2012-04-20T21:24:41 +00:00 app [web.1]:AWS :: S3 :: Errors :: SignatureDoesNotMatch(計算された署名 署名は、あなたが指定した署名と一致しません。チェ CKあなたの鍵と署名方式):。

ここでは私のattachment.rbモデルです:

has_attached_file :pic, :styles => { :medium => "500x280>",:slide => "180x260>", :thumb => "150x100#" },  
:storage => :s3, 
      :bucket => 'sample_bucket', 
      :s3_credentials => { 
       :access_key_id => 'ASDDSAMPLEKEYDFSDF', 
       :secret_access_key => 'Dfsdf887-sample-secret-key-dfdsasd', 
      } 

このエラーの理由かもしれませんか?

答えて

1

私はペーパークリップ2.4.5をしましたし、こちらのモデル内部の定義です:

has_attached_file :logo, 
       :path => "assets/:class/:attachment/:id/:style.:extension", 
       :storage => :s3, 
       :bucket => ENV['S3_BUCKET'], 
       :s3_permissions => 'authenticated-read', 
       :s3_protocol => "http", 
       :s3_credentials => { :access_key_id => ENV['S3_KEY'], 
            :secret_access_key => ENV['S3_SECRET'] }, 
       :styles => { :index => "72x72>", 
          :billboard => "120x120>" } 
関連する問題