5
我試圖在Heroku上部署我的第一個應用程序,並有一點麻煩讓S3連接工作。建立與Heroku亞馬遜S3連接
這裏是我從Heroku的日誌中發現了錯誤:我有以下的配置
AWS::S3::CurrentBucketNotSpecified (No bucket name can be inferred from your current connection's address (`s3.amazonaws.com')):
:
配置/ s3.yml
development:
bucket_name: dev.myapp.mycompany
access_key_id: <####>
secret_access_key: <####>
test:
bucket_name: test.myapp.mycompany
access_key_id: <####>
secret_access_key: <####>
production:
bucket_name: production.myapp.mycompany
access_key_id: <####>
secret_access_key: <####>
項目模型
class Project < ActiveRecord::Base
has_attached_file :preview,
:storage => :s3,
:s3_credentials => "#{RAILS_ROOT}/config/s3.yml",
:path => "/:style/:filename",
:styles => {
:thumb => "72x44",
:small => "312x192"
}
has_many :posts, :dependent => :destroy
end
是做到了。我在那裏使用附件代碼。沒有意識到這種輕微的差異,並沒有在文檔中引起注意。謝謝。 – bgadoci 2010-06-16 17:29:07