views:

256

answers:

1

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
+2  A: 

The config is :bucket, not :bucket_name

http://docs.heroku.com/s3

Ben Hughes
that did it. I was using the code for attachment fu there. Didn't realize that slight diff and doesn't call attention to it in the doc. Thanks.
bgadoci