title: Errors::SignatureDoesNotMatch, AWS-SDK gem for S3 support on paperclip 3.0.1 and rails 3.2
body: <p>I'm migrating my app from Rails 3.0.9 to 3.2.3 and ruby 1.9.3. I was using paperclip(2.3.11) with aws-s3 gem to store my pictures.</p>
  
  <p>Now I want to use the last version of paperclip(3.0.1) and then I have to use aws-sdk gem.</p>
  
  <p>I've set my aws.yml file as:</p>
  
  <pre><code>    development: &amp;development
        bucket: bucket_name_for_dev
        access_key_id: *****
        secret_access_key: *******
      staging:
        &lt;&lt;: *development
        bucket: bucket_name_for_staging
  
      production:
        &lt;&lt;: *development
        bucket: bucket_name_for_prod
  </code></pre>
  
  <p>my model contains :</p>
  
  <pre><code>    has_attached_file :picture, :styles =&gt; { :medium =&gt; "300x300&gt;", :thumb =&gt; "50x50&gt;" }, :default_url =&gt; 'picture_missing.png',
           :storage =&gt; :s3,
           :bucket =&gt; "bucket_name_for_dev",
           :s3_credentials =&gt; Rails.root.join("config/aws.yml"),
           :path =&gt; "/presentation_pictures/:id/:style/:filename",
           :url  =&gt; ":s3_eu_url"
  
      attr_accessible :picture
      attr_accessor :picture_url
  </code></pre>
  
  <p>When trying to upload a file, I get the error: </p>
  
  <p><code>AWS::S3::Errors::SignatureDoesNotMatch</code>
  <code>The request signature we calculated does not match the signature you provided. Check your key and signing method.</code></p>
  
  <p>I verified that my keys are accessible and set to the right value.</p>
  
  <p>Here is also what I get from console: </p>
  
  <pre><code>    [paperclip] Saving attachments.
      [paperclip] saving /presentation_pictures/43/original/Image_1.png
      [AWS S3 200 0.813272 0 retries] put_object(:acl=&gt;:public_read,:bucket_name=&gt;"*******_dev",:content_type=&gt;"image/png",:data=&gt;#&lt;Paperclip::UploadedFileAdapter:0x2e144b4 @target=#&lt;ActionDispatch::Http::UploadedFile:0x2dbb1fc @original_filename="Image 1.png", @content_type="image/png", @headers="Content-Disposition: form-data; name=\"presentation_picture[picture]\"; filename=\"Image 1.png\"\r\nContent-Type: image/png\r\n", @tempfile=#&lt;File:/var/folders/tb/tbmv4LE9EwGNPr1QqU2S0E+++TI/-Tmp-/RackMultipart20120407-33502-1gajfe9&gt;&gt;, @tempfile=#&lt;File:/var/folders/tb/tbmv4LE9EwGNPr1QqU2S0E+++TI/-Tmp-/Image 1.png20120407-33502-an4dcy&gt;&gt;,:key=&gt;"presentation_pictures/43/original/Image_1.png")
  </code></pre>
  
  <p>Do you have any idea from where could come this problem?
  Thx</p>