Skip to content

Instantly share code, notes, and snippets.

@iqbalhasnan
Created January 10, 2017 16:00
Show Gist options
  • Save iqbalhasnan/2fd3e0d62a8fabae7c5ab4c53a7b4a0a to your computer and use it in GitHub Desktop.
Save iqbalhasnan/2fd3e0d62a8fabae7c5ab4c53a7b4a0a to your computer and use it in GitHub Desktop.
Uninitialized Constant Carrierwave::Storage::Fog
# Before
CarrierWave.configure do |config|
config.storage = :fog
config.fog_credentials = {
:provider => "AWS",
:aws_access_key_id => ENV["S3_KEY"],
:aws_secret_access_key => ENV["S3_SECRET"],
:region => ENV["S3_REGION"]
}
config.fog_directory = ENV["S3_BUCKET"]
end
# After
CarrierWave.configure do |config|
config.fog_credentials = {
:provider => "AWS",
:aws_access_key_id => ENV["S3_KEY"],
:aws_secret_access_key => ENV["S3_SECRET"],
:region => ENV["S3_REGION"]
}
config.storage = :fog
config.fog_directory = ENV["S3_BUCKET"]
end
# Move config.storage, after the config.fog_credentials
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment