title: Images upload successfully to aws s3 bucket but do not display on my site
body: <p>I am using Rails with Heroku and AWS S3 to deploy a pinterest like website that I created through a tutorial. Users are successfully able to upload images to my s3 bucket. The problem is, uploaded images are supposed to display in the index (and show) but do not. </p>
  
  <p>I created a bucket policy so the 'getobject' method is enabled. </p>
  
  <pre><code>{
  "Id": "Policy1445210052484",
  "Version": "2012-10-17",
  "Statement": [
      {
          "Sid": "Stmt1445209989872",
          "Action": [
              "s3:GetObject"
          ],
          "Effect": "Allow",
          "Resource": "arn:aws:s3:::wyattsbucket/*",
          "Principal": "*"
      }
  ]
  </code></pre>
  
  <p>}</p>
  
  <p>Here is a screenshot of the postings on my site:</p>
  
  <p><a href="https://i.stack.imgur.com/x3suy.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/x3suy.png" alt="enter image description here"></a>
  Heroku is not receiving any errors so I believe the problem is either in the S3 bucket or in my Rails environment. This is my first post, please forgive the amateur formatting, and if you have any ideas please let me know!</p>
  
  <p>Thanks in advance.  </p>
  
  <p>= form_tag pins_path </p>
  
  <p>views/pins/index.html.haml </p>
  
  <pre><code>#pins.transitions-enabled
    - @pins.each do |pin|
      .box.panel.panel-default
        = link_to (image_tag pin.image.url), pin
        .panel-body
          %h2= link_to pin.title, pin
          %p.user
          Submitted by
          = pin.user.email
  </code></pre>
  
  <p>models/pin.rb</p>
  
  <pre><code>class Pin &lt; ActiveRecord::Base
      acts_as_votable
      belongs_to :user
      has_attached_file :image, styles: { medium: "500x500&gt;" }
      validates_attachment_content_type :image, content_type: /\Aimage\/.*\Z/
  
  
  end
  </code></pre>