Question

Other questions answer how to open (and save) a Fog connection with ENV variables, or how to configure Carrierwave with ENV variables, but I want to set the Fog credentials universally and in one place.

Was it helpful?

Solution

Fog.credentials = {            
  :aws_access_key_id => ENV['AWS_ACCESS_KEY_ID'],
  :aws_secret_access_key => ENV['AWS_SECRET_ACCESS_KEY'],
}
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top