title: Ruby on Rails / Paperclip / AWS::S3::NoSuchBucket error
body: <p>I installed the paperclip plugin and was able to use it locally. When I configured it to work with amazon S3 I keep getting the NoSuchBucket (The specified bucket does not exist) error. Paperclip documentation states that the bucket will be created if it doesn't exist but clearly
  something is going wrong in my case.</p>
  
  <p>I first insalled aws-s3 gem (v0.6.2)
  then also installed right_aws gem (v1.9.0)</p>
  
  <p>both have corresponding</p>
  
  <pre><code>config.gem "aws-s3", :lib =&gt; "aws/s3"
  config.gem 'right_aws', :version =&gt; '1.9.0'
  </code></pre>
  
  <p>lines in environment.rb file</p>
  
  <p>The code for the image.rb file with paperclip is as follows:</p>
  
  <pre><code>class Image &lt; ActiveRecord::Base
  
      belongs_to  :work
  
      has_attached_file :photo, :styles =&gt; {:big =&gt; "612x1224&gt;", :small =&gt; "180X360&gt;", :thumb =&gt; "36x36#"},
                        :storage =&gt; 's3',
                        :s3_credentials =&gt; YAML.load_file("#{RAILS_ROOT}/config/s3.yml")[RAILS_ENV],   
                        :path =&gt; ":attachment/:id/:style/:basename.:extension",
                        :bucket =&gt; 'my-unique-image-bucket'
  
      attr_protected :photo_file_name, :photo_content_type, :photo_size
  
      validates_attachment_presence :photo
      validates_attachment_size :photo, :less_than =&gt; 3.megabytes
      validates_attachment_content_type :photo, :content_type =&gt; ['image/jpeg', 'image/png', 'image/gif']
  
  end
  </code></pre>