title: Rails4 Paperclip attachments not working in production
body: <p>I'm trying to upload Avatars to Users and it's working in development but not in production</p>
  
  <p>Rails4, Heroku, S3, Paperclip, Devise</p>
  
  <p>Everything is working fine in dev.  When I push to Heroku, run Heroku migrate , and try to update devise User page with an attachment(:avatar) image, it returns the image url as missing.</p>
  
  <p>In heroku logs --tail it appears to run normally, even saving the image to S3 (I checked and they are saving in my S3 bucket).  Also if I pull pg database I can see the columns in the database associated with attachment images (4 columns).  In production the attachment file columns are empty when I check the database, so nothing is going to them, but they are stored in S3.</p>
  
  <p>This is kind of weird?  I thought Paperclip Docs say that it will save to database and run validations before sending to server.</p>
  
  <p><img src="https://i.stack.imgur.com/zGSX9.png" alt="enter image description here"></p>
  
  <p>My Form</p>
  
  <p><img src="https://i.stack.imgur.com/c1L5M.png" alt="enter image description here"></p>
  
  <p>My view (index.html.erb)</p>
  
  <p><code>&lt;%= image_tag post.user.avatar.url(:thumb) %&gt;</code></p>
  
  <p>And here's my log after successfully saving to S3 (heroku logs --tail)</p>
  
  <p><img src="https://i.stack.imgur.com/t5kxk.png" alt="enter image description here"></p>
  
  <p>If I check the database, the columns for attachments are still <code>nil</code></p>
  
  <p>what confuses me is that this works in Development but not in production and appears to not have anything to do specifically with an S3 error.</p>
  
  <p>what am I doing wrong??</p>