Skip to content

Instantly share code, notes, and snippets.

@kristenhazard
Created November 13, 2012 22:30
Show Gist options
  • Save kristenhazard/4068890 to your computer and use it in GitHub Desktop.
Save kristenhazard/4068890 to your computer and use it in GitHub Desktop.
Suntoucher carrierwave config
CarrierWave.configure do |config|
bucket = case Rails.env
when "development" then "hcadirectory-dev"
when "staging" then "hcadirectory-staging"
when "production" then "hcadirectory"
end
config.fog_credentials = {
:provider => 'AWS',
:aws_access_key_id => 'ABCDEFGHIJKLMNOPQRSTUVWXYZ',
:aws_secret_access_key => 'secretkey/secretkey/secretkey',
:region => 'us-west-1'
}
config.fog_directory = bucket
if Rails.env.test?
config.storage :file
else
config.storage :fog
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment