I am attempting to deploy my first app on Heroku and having a little trouble getting the S3 connection to work.
Here is the error I am getting from the Heroku logs:
AWS::S3::CurrentBucketNotSpecified (No bucket name can be inferred from your current connection's address (`s3.amazonaws.com')):
I have the following configured:
config/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: <####>
Project Model
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
Amazon Simple Storage Service (S3) is a durable and available store, ideal for storing application content like media files, static assets, and user uploads. Storing static files elsewhere is crucial for Heroku apps since dynos have an ephemeral filesystem.
AWS Storage Gateway now supports NFS file share auditing end-user access to files, folders, and file shares on Amazon S3 File Gateway.
The config is :bucket, not :bucket_name
http://docs.heroku.com/s3
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With