Skip to content

Instantly share code, notes, and snippets.

@ishouvik
Created February 16, 2014 13:45
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ishouvik/9034427 to your computer and use it in GitHub Desktop.
Save ishouvik/9034427 to your computer and use it in GitHub Desktop.
Rails: config/initializers/carrierwave.rb
CarrierWave.configure do |config|
if Rails.env.development? or Rails.env.test?
config.storage = :file
else
config.fog_credentials = {
:provider => 'AWS',
:aws_access_key_id => '<access key>',
:aws_secret_access_key => '<secrect acess key >'
}
config.fog_directory = "<name of your bucket>"
config.cache_dir = "#{Rails.root}/tmp/uploads"
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment