title: Handling audio assets in Rails 3.2 with audio_* helpers
body: <p>I'm trying to include audio files to the asset pipeline in my Rails 3.2 app and reference them with the help of the audio_* helper methods, but it doesn't work like I think it should work:</p>
  
  <ol>
  <li><p>I have a audio file here:</p>
  
  <p>app/assets/audios/onturn.wav</p></li>
  <li><p>I reference it in the view (HAML):</p>
  
  <p>%audio{ src: audio_path('onturn.wav'), id: 'on-turn-sound' }</p></li>
  </ol>
  
  <p>which results in development to:</p>
  
  <pre><code>&lt;audio id='on-turn-sound' src='/audios/onturn.wav'&gt;&lt;/audio&gt;
  </code></pre>
  
  <p>and in production to:</p>
  
  <pre><code>&lt;audio id='on-turn-sound' src='/audios/onturn-7728640b5d844c6b676d10f7572b6c8e.wav'&gt;&lt;/audio&gt;
  </code></pre>
  
  <p>However, none of these files exist. Lets take a look at the resulting manifest.yml file:</p>
  
  <pre><code>onturn.wav: onturn-7728640b5d844c6b676d10f7572b6c8e.wav
  onturn/index.wav: onturn-7728640b5d844c6b676d10f7572b6c8e.wav
  </code></pre>
  
  <p>So, only</p>
  
  <pre><code>public/assets/onturn.wav
  public/assets/onturn-7728640b5d844c6b676d10f7572b6c8e.wav
  </code></pre>
  
  <p>exist.</p>
  
  <p>If I put the file in public/audios manually and not in app/assets/audios, I get an error in production because the file is not precompiled, so the audio_path helper can't find it. If I put the file at both locations, it is also not found because no compiled version exists in public/audios but I don't get the error.</p>
  
  <p>What is the clue with correct handling of audio and video files? CSS, JS and images are working fine, but audio and video does not work correctly.</p>