title: Rails 4 Javascript: Having trouble with image paths
body: <p>I'm trying to get the background image to change every 6 seconds and it's always a 404 error: </p>
  
  <p>For example, the below appears in the JS console</p>
  
  <pre><code>http://localhost:3000/app/assets/images/ggb_mist.png 404 (Not Found) 
  </code></pre>
  
  <p>To simplify this I just tried a <code>background-color</code> to make sure it was working. See below:</p>
  
  <pre><code>$(document).ready(function() {
    function testing() {
      $('.holder').css('background-color', 'red');
    };
  });
  </code></pre>
  
  <p>The above works. Now when I try to do the same with an image (which is located in <code>app/assets/images/imagefilenamehere.png</code> I always get a 404 error. I've tried:</p>
  
  <pre><code>filenamehere.png
  ../assets/images/filenamehere.png
  ../app/assets/images/filenamehere.png
  ../images/filenamehere.png
  </code></pre>
  
  <p>Why won't the below work?</p>
  
  <pre><code>$('.holder').css({'backgroundImage':'../assets/images/filenamehere.png'});
  </code></pre>
  
  <p>Any input on the matter is appreciated. </p>