Amazon S3

Hi,

I am currently trying to upload images on to Amazon S3 using paperclip
for
my rails app. The upload seems to work locally, however I receive the
following error in production -

  • ArgumentError (missing required :bucket option):*
    
  • app/controllers/meals_controller.rb:34:in `create'*
    

Heres the *production.rb *file -

config.paperclip_defaults = {
:storage => :s3,
:s3_credentials => {
:bucket => ENV[‘S3_BUCKET_NAME’],
:access_key_id => ENV[‘AWS_ACCESS_KEY_ID’],
:secret_access_key => ENV[‘AWS_SECRET_ACCESS_KEY’]
}
}

Here are the Gems that are currently running -

ruby ~> 2.0.0
rails ~> 4.0.1
paperclip ~> 4.10
aws-sdk ~> 1.34.1

Thanks in advance

On 28 February 2014 01:07, Samuel S. [email protected] wrote:

Heres the production.rb file -

config.paperclip_defaults = {
:storage => :s3,
:s3_credentials => {
:bucket => ENV[‘S3_BUCKET_NAME’],
:access_key_id => ENV[‘AWS_ACCESS_KEY_ID’],
:secret_access_key => ENV[‘AWS_SECRET_ACCESS_KEY’]
}
}

Google found this which might help.
http://stackoverflow.com/questions/20424724/ruby-on-rails-paperclip-amazon-aws-s3-heroku

Colin

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs