title: Playing song in jPlayer that was uploaded via Paperclip - Ruby on Rails - jQuery - jPlayer
body: <p>Thanks for any help in advance. </p>
  
  <p>So, I'm storing songs in a filesystem with Paperclip. I'm then trying to play these songs with jPlayer. </p>
  
  <p>I have followed all the directions but can't seem to get the audio playing via clicking on a link_to method that is supposed to parse the audio to jPlayer.</p>
  
  <p>Basically a song should play when the button 'Play Song' is clicked. </p>
  
  <p>My jPlayer function looks like this:</p>
  
  <pre><code>$(document).ready(function(){
      $("#jquery_jplayer_1").jPlayer({
          ready: function () {
              $(this).jPlayer("setMedia", {
                  mp3: '&lt;source&gt;'
              });
          },
          swfPath: "jplayerflash",
          supplied: "mp3",
      });
    });  
  </code></pre>
  
  <p>My view looks like this:</p>
  
  <pre><code>&lt;td&gt;&lt;%= link_to 'Play Song', song_upload.song.url, :class =&gt; "html5" %&gt;&lt;/td&gt;
  </code></pre>
  
  <p>The audio files are stored via paperclip in assets/user_song_uploads...
  The songs are all MP3 format and I'm using Chrome so everything should work. </p>
  
  <p>The problem comes in when trying to set the media in jPlayer. </p>
  
  <p><a href="http://www.jplayer.org/latest/quick-start-guide/step-7-audio/" rel="nofollow">Link to how jPlayer should be implemented</a>
  <a href="http://net.tutsplus.com/tutorials/create-a-simple-music-streaming-app-with-ruby-on-rails/" rel="nofollow">This where I initially learned how to implement a music listening application. Half way through in the section 'Streaming with HTML5 Audio' is why i used '' - but clearly not working with this implementation. </a></p>