Keith Connolly Keith Connolly - 1 year ago 109
Ruby Question

uninitialized constant AWS::S3::Base via AWS-SDK

This is an issue I'm having with the fact that after I upgraded to AWS-SDK (instead of aws-s3) with the newer version(s) of paperclip I can no longer call AWS::S3::Base.establish_connection! at all.

Where ever in my code I call

AWS::S3::Base.establish_connection!(:access_key_id => '****', :secret_access_key => '***')

I get this error...

NameError (uninitialized constant AWS::S3::Base):
app/models/asset.rb:28:in `move_upload_from_temp_to_final_resting_place'

Answer Source

Yeah, aws-sdk doesn't have AWS::S3::Base. I think this is the closest equivalent:

s3 = => '****', :secret_access_key => '***')
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download