Skip to content

Instantly share code, notes, and snippets.

@dan1d
Created March 20, 2013 15:02
Show Gist options
  • Save dan1d/5205372 to your computer and use it in GitHub Desktop.
Save dan1d/5205372 to your computer and use it in GitHub Desktop.
# config/initializer/paperclip.rb
if Rails.env.production?
Paperclip::Attachment.default_options[:storage] = :s3
Paperclip::Attachment.default_options[:s3_credentials] = {
access_key_id: ENV["ACCSES_KEY_ID"],
secret_access_key: ENV['ACCSES_SECRET_KEY'],
bucket: ENV['BUCKET']
}
Paperclip::Attachment.default_options[:s3_host_alias] = "images.kole.com"
end
production:
ACCSES_KEY_ID: '1key'
ACCSES_SECRET_KEY: 'ID'
BUCKET: 'kapp'
GEMFILE:
gem "figaro", '0.6.3'
gem 'aws-sdk', '1.8.5'
figaro: https://github.com/laserlemon/figaro
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment