title: How to edit production.rb in my rails app to get it working using heroku and paperclip?
body: <p>I am using paperclip + AWS in my rails app to upload images.</p>
  
  <p>When I reference images in my view as</p>
  
  <pre><code>&lt;%= image_tag product.avatar.url(:medium) %&gt; 
  </code></pre>
  
  <p>current image urls are showing up as:</p>
  
  <pre><code>http://s3.amazonaws.com/rockywolfugc/products/avatars/000/000/003/medium/59577_10100258833612183_1508749_n.jpg?1386876682
  </code></pre>
  
  <p>I need them to show up as:</p>
  
  <pre><code>http://rockywolfugc.s3-us-west-2.amazonaws.com/products/avatars/000/000/003/medium/59577_10100258833612183_1508749_n.jpg?1386876682
  </code></pre>
  
  <p>At <a href="http://rubydoc.info/gems/paperclip/Paperclip/Storage/S3" rel="nofollow">http://rubydoc.info/gems/paperclip/Paperclip/Storage/S3</a> I'm seeing there is an option for ":s3_domain_url" but I'm not quite sure how to use it.</p>
  
  <p>Below is the relevant portion of production.rb</p>
  
  <pre><code>config.paperclip_defaults = {
    :storage =&gt; :s3,
    :s3_credentials =&gt; {
      :bucket =&gt; ENV['S3_BUCKET_NAME'],
      :access_key_id =&gt; ENV['AWS_ACCESS_KEY_ID'],
      :secret_access_key =&gt; ENV['AWS_SECRET_ACCESS_KEY']
    }
  }
  </code></pre>
  
  <p>Where do I integrate the s3_domain_url in this file? Additionally, what do I have to do on heroku to get this to run? Example: heroku config:set xxxx=yyyy</p>