Skip to content

Instantly share code, notes, and snippets.

@rianrainey
Created October 14, 2014 14:06
Show Gist options
  • Save rianrainey/4ad75a64867dd4aac51f to your computer and use it in GitHub Desktop.
Save rianrainey/4ad75a64867dd4aac51f to your computer and use it in GitHub Desktop.
Set up Amazon S3 for Paperclip on Heroku
# Amazon S3 settings for Paperclip uploads
  config.paperclip_defaults = {
    :storage => :s3,
    :s3_protocol => 'https',
    :s3_credentials => {
    :bucket => ENV['AWS_BUCKET'],
    :access_key_id => ENV['AWS_ACCESS_KEY_ID'],
    :secret_access_key => ENV['AWS_SECRET_ACCESS_KEY']
  }
}
# Set env vars
heroku config:set AWS_ACCESS_KEY_ID=xxx AWS_SECRET_ACCESS_KEY=xxx AWS_BUCKET=bucket-name -a app-name
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment