I am trying to deploy my first Heroku app and find it a bit difficult for the S3 connection to work.
Here is the error I get from Heroku logs:
AWS::S3::CurrentBucketNotSpecified (No bucket name can be inferred from your current connection address (`s3.amazonaws.com')):
I have the following configured:
config / s 3.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
source
share