title: Carrierwave config with fog/aws
body: <p>My application seems to be throwing an error on startup when using the fog/aws gem and the instructions in the carrierwave wiki.</p>
  
  <p>I simply want to upload to Amazon S3.</p>
  
  <p>The error being thrown is</p>
  
  <pre><code> undefined method `fog_provider=' for CarrierWave::Uploader::Base:Class
  </code></pre>
  
  <p>Gemfile.rb</p>
  
  <pre><code>gem "fog"
  gem "fog-aws"
  gem "carrierwave"
  </code></pre>
  
  <p>initializers/carrierwave.rb</p>
  
  <pre><code>CarrierWave.configure do |config|
    config.permissions = 0666
    config.directory_permissions = 0777
    config.storage = :fog
    config.fog_provider = 'fog/aws'
    config.fog_credentials = {
      provider:              'AWS',
      aws_access_key_id:     'KEYID',
      aws_secret_access_key: 'SECRETID',
      region:                'us-east-1'
    }
    config.fog_directory  = 'bucket-name'
    config.fog_public     = false
  end
  </code></pre>