title: Javascripts include placement with Rails 3.1 and JQuery
body: <p>I can't seem to find a definitive answer to this and I am sure I am not the first or last to fret about it.</p>
  
  <p>Current best practices recommends placing javascripts at the bottom of the page.  However, any blocks that fire using proper <code>$(function() {...});</code> will fail to find $.</p>
  
  <p>While its not specific to just the twitter bootstrap, I am using that for my layout and such.  The application layout that twitter produced moved the scripts to the bottom.</p>
  
  <p>So JQuery needs to be present in the page before the blocks are processed.  </p>
  
  <p>Is it better to separate just the JQuery library and include that in the head and the rest via application.js at the end of the page or is it better to allow the asset pipeline to create one file and send it all at once?  </p>
  
  <p>Obviously, there are tradeoffs, but what's the general consensus?</p>
  
  <p>The answer: move your javascripts out of the html and into external files
    ..is not exactly what I am hoping for :)</p>