title: CarrierWave not working with Fog and S3: ArgumentError..."is not a recognized storage provider"
body: <p>Maybe this is a bug in CarrierWave? I read similar questions here, tried example code and to reproduce a new app, and it is not working.</p>
  
  <p>I tried old apps with their code that is like the examples on Github, but now it doesn't work.</p>
  
  <p>Full trace: <a href="http://pastebin.com/Ca1SphUU" rel="nofollow">here</a>
  Gemfile</p>
  
  <pre><code>source 'https://rubygems.org'
  
  gem 'rails', '3.2.2'
  
  gem 'mini_magick', '~&gt; 3.4'
  gem 'carrierwave', '~&gt; 0.5.8'
  gem 'fog'
  gem 'activeadmin', '~&gt; 0.4.3'
  gem 'httparty'
  gem 'dalli'
  gem 'json'
  gem "mercury-rails", :git =&gt; "https://github.com/jejacks0n/mercury.git"
  gem 'newrelic_rpm'
  
  group :assets do
    gem 'sass-rails',   '~&gt; 3.2.4'
    gem 'coffee-rails', '~&gt; 3.2.2'
    gem 'uglifier', '&gt;= 1.0.3'
  end
  
  gem 'jquery-rails'
  gem 'jquery_datepicker'
  group :development do
    gem 'sqlite3'
  end
  
  group :production do
    gem 'pg'
  end
  </code></pre>
  
  <p>This is the carrierwave configuration:</p>
  
  <pre><code># config/carrierwave.rb
  # encoding: utf-8
  require 'carrierwave'
  
  CarrierWave.configure do |config|
    config.fog_credentials = {
      :provider               =&gt; 'AWS',       # required
      :aws_access_key_id      =&gt; 'ACCESS_KEY', # required
      :aws_secret_access_key  =&gt; 'SECRET_KEY', # required
      :region                 =&gt; 'eu-west-1'  # optional, defaults to 'us-east-1'
    }
    config.fog_directory  = 'lkrails'                     # required
    config.fog_host       = 'https://lkrails.s3-eu-west-1.amazonaws.com'
    config.fog_public     = true # optional, defaults to true
    config.fog_attributes = {'Cache-Control'=&gt;'max-age=315576000'}  # optional, defaults to {}
  
     # Make the tmp dir work on Heroku
     #  config.cache_dir = "#{Rails.root}/tmp/uploads"
  end
  </code></pre>
  
  <p>This is The uploader</p>
  
  <pre><code># uploaders/images_uploader.rb
  class ImagesUploader &lt; CarrierWave::Uploader::Base
      include CarrierWave::MiniMagick
      storage :fog
  
      def store_dir
          "uploads/#{model.class.to_s.underscore}/#{mounted_as}/#{model.id}"
      end
      version :tiny do
         process :resize_to_limit =&gt; [25, 25]
      end
      version :thumb do
         process :resize_to_limit =&gt; [50, 50]
      end
      version :medium do
          process :resize_to_limit =&gt; [120, 120]
      end
  
      def extension_white_list
         %w(jpg jpeg gif png)
      end
  
      def filename 
      if original_filename 
        @name ||= Digest::MD5.hexdigest(File.dirname(current_path))
        "#{@name}.#{file.extension}"
      end
  end
  </code></pre>