title: Audio has contents that are not what they are reported to be - Paperclip
body: <p>A beginner in Ruby here!
  I am trying to create a Soundcloud clone on ruby.
  When I try to upload an audio file i get the error:<br><br>
  1 error prohibited this song from being saved:<br>
  Audio has contents that are not what they are reported to be<br><Br></p>
  
  <p>controller: song.rb</p>
  
  <pre><code>class Song &lt; ActiveRecord::Base
  belongs_to :user
  has_attached_file :audio,
                    :url =&gt; "/assets/:class/:id/:attachment/:basename.:extension",
                    :path =&gt; ":rails_root/public/assets/:class/:id/:attachment/:basename.:extension"
  validates_attachment :audio,
                       :content_type =&gt; { :content_type =&gt; ["audio/mpeg", "audio/mp3"] },
                       :file_name =&gt; { :matches =&gt; [/mp3\Z/] }
  </code></pre>
  
  <p>_form.html.erb</p>
  
  <pre><code>&lt;%= form_for(@song) do |f| %&gt;
  &lt;% if @song.errors.any? %&gt;
  &lt;div id="error_explanation"&gt;
    &lt;h2&gt;&lt;%= pluralize(@song.errors.count, "error") %&gt; prohibited this song from being saved:&lt;/h2&gt;
    &lt;ul&gt;
    &lt;% @song.errors.full_messages.each do |message| %&gt;
      &lt;li&gt;&lt;%= message %&gt;&lt;/li&gt;
    &lt;% end %&gt;
    &lt;/ul&gt;
  &lt;/div&gt;
  &lt;% end %&gt;
  &lt;div class="field"&gt;
   &lt;%= f.label :audio %&gt;&lt;br&gt;
   &lt;%= f.file_field :audio%&gt;
  &lt;/div&gt;  
  &lt;div class="field"&gt;
   &lt;%= f.label :title %&gt;&lt;br&gt;
   &lt;%= f.text_field :title %&gt;
  &lt;/div&gt;
  &lt;div class="field"&gt;
   &lt;%= f.label :description %&gt;&lt;br&gt;
   &lt;%= f.text_field :description %&gt;
  &lt;/div&gt;
  &lt;div class="actions"&gt;
   &lt;%= f.submit %&gt;
  &lt;/div&gt;
  &lt;% end %&gt;
  </code></pre>
  
  <p>show.html.erb</p>
  
  <pre><code>&lt;p id="notice"&gt;&lt;%= notice %&gt;&lt;/p&gt;
  &lt;p&gt;
  &lt;strong&gt;Audio:&lt;/strong&gt;
  &lt;%= @song.audio.url %&gt;
  &lt;/p&gt;
  &lt;p&gt;
  &lt;strong&gt;Title:&lt;/strong&gt;
  &lt;%= @song.title %&gt;
  &lt;/p&gt;
  &lt;%= link_to 'Edit', edit_song_path(@song) %&gt; |
  &lt;%= link_to 'Back', songs_path %&gt;
  </code></pre>