title: Rails 3.1, paperclip, s3 - uninitialized constant AWS::S3::Base
body: <p>I am getting the following error when trying to upload an image using paperclip and s3 storage. The app worked fine uploading locally, but when I've made the required changes to use s3 I get the following:</p>
  
  <blockquote>
    <p>NameError in ImagesController#create</p>
    
    <p>uninitialized constant AWS::S3::Base</p>
  </blockquote>
  
  <p>Gemfile</p>
  
  <pre><code>source 'http://rubygems.org'
  
  gem 'rails', '3.1.3'
  
  gem 'sqlite3'
  
  group :assets do
    gem 'sass-rails',   '~&gt; 3.1.5'
    gem 'coffee-rails', '~&gt; 3.1.1'
    gem 'uglifier', '&gt;= 1.0.3'
    gem 'dynamic_form'
  end
  
  gem 'aws-sdk'
  gem 'paperclip'
  </code></pre>
  
  <p>models/Image.rb</p>
  
  <pre><code>class Image &lt; ActiveRecord::Base
      has_attached_file :file, 
                        :styles =&gt; {
                            :featured =&gt; "970x560&gt;", 
                            :thumb =&gt; "192x112&gt;" 
                        },
                        :storage =&gt; :s3,
                        :s3_credentials =&gt; "#{Rails.root}/config/amazon_s3.yml"
  end
  </code></pre>
  
  <p>config/amazon_s3.yml</p>
  
  <pre><code>bucket: myapp-dev
  access_key_id: ####################
  secret_access_key: ################################
  </code></pre>
  
  <p>Bundled gems:
  aws-sdk (1.2.5)
  paperclip (2.4.5) 
  rails (3.1.3) </p>