title: How to use jQuery Uniform with Rails 3
body: <p>I'm trying to get the Default Uniform up on my rails webapp, but have not yet found any solid tutorial/guide.  I've confirmed that I have the jquery gem</p>
  
  <p>In my Gemfile:</p>
  
  <pre><code>gem 'jquery-rails', '2.0.2'
  </code></pre>
  
  <p>and then ran in the terminal from within my app directory to make sure:</p>
  
  <pre><code>bundle install
  </code></pre>
  
  <p>I put uniform.default.css in my stylesheets directory, jquery.uniform.js in my javascripts directory, and the images in my images directory.  I then include them in my view with the form:</p>
  
  <pre><code>  1 &lt;!-- for jQuery uniform --&gt;
    2 &lt;script src="http://ajax.googleapis.com/ajax/libs/jquery/1.8/jquery.min.js"&gt;&lt;/script&gt;
    3 &lt;%= javascript_include_tag "jquery.uniform.js" %&gt;
    4 &lt;%= stylesheet_link_tag "uniform.default.css" %&gt;
    5 &lt;script type='text/javascript'&gt;
    6   // On load, style typical form elements
    7   $(function () {
    8     $("select, input, button, textarea, submit").uniform();
    9   });
   10 &lt;/script&gt;
   11 &lt;!-- end for jQuery uniform --&gt;
  </code></pre>
  
  <p>No, images are showing up though!  I peeked into the source of uniform.default.css file and found that all the images are relative to the current directory:</p>
  
  <pre><code>  background-image: url("../images/sprite.png");
  </code></pre>
  
  <p>Luckily, that still seems to be the case the way the default tree of the rails 3 app is set up, but there are issues.  I also tried editing every instance of this to be an absolute path that I've confirmed to be valid with another image.  e.g.:</p>
  
  <pre><code>  background-image: url("/assets/images/sprite.png");
  </code></pre>
  
  <p>But still no luck.  Any ideas?  Does the javascript also depend on a particular path for the images?  It shouldn't, right?</p>