title: error uploading file to S3 :missing required :bucket option
body: <p>I 'm trying to upload data to s3 using paperclip. I keep getting the following error</p>
  
  <blockquote>
    <p>missing required :bucket option</p>
    
    <p>app/controllers/documents_controller.rb:64:in <code>block in update'
    app/controllers/documents_controller.rb:63:in</code>update'</p>
  </blockquote>
  
  <p>I have updated my config/environments/development.rb with appropriate s3 credentials. I 'm getting this error when running my app on local, have not yet tried it on Heroku.
  Any suggestions what else am I missing?</p>
  
  <p><strong>document.rb</strong></p>
  
  <pre><code>class Document &lt; ActiveRecord::Base
    attr_accessible :documentId, :name, :docstack
  
    has_attached_file :docstack, styles: {
      thumb: '200x200',
      medium: '33x300&gt;'
    }
  end
  </code></pre>
  
  <p><strong>development.rb</strong></p>
  
  <pre><code>config.paperclip_defaults = {
    :storage =&gt; :s3,
    :s3_credentials =&gt; {
      :bucket =&gt; ENV['bucket'],
      :access_key_id =&gt; ENV['123'],
      :secret_access_key =&gt; ENV['key']
    }
  }
  </code></pre>
  
  <p><strong>UPDATE:</strong>
  Referring to <a href="https://devcenter.heroku.com/articles/paperclip-s3#define-the-file-attribute-in-the-model" rel="nofollow noreferrer">this</a> blog
  Thanks</p>