Skip to content

Instantly share code, notes, and snippets.

@taptapdan
Last active December 5, 2015 04:23
Show Gist options
  • Select an option

  • Save taptapdan/6dde1e89acc052ac7ca8 to your computer and use it in GitHub Desktop.

Select an option

Save taptapdan/6dde1e89acc052ac7ca8 to your computer and use it in GitHub Desktop.
RailsTutorial Chapter 10 // Configuring CarrierWave to use S3 // config/initializers/carrier_wave.rb
# config/initializers/carrier_wave.rb
if Rails.env.production?
CarrierWave.configure do |config|
config.fog_credentials = {
# Configuration for Amazon S3
:provider => 'AWS',
:aws_access_key_id => ENV['S3_ACCESS_KEY'],
:aws_secret_access_key => ENV['S3_SECRET_KEY'],
:region => ENV['S3_REGION']
}
config.fog_directory = ENV['S3_BUCKET']
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment