title: how to fix 'jQuery is not defined' error in jquery library?
body: <p><strong>Rails fix</strong>: make sure <code>&lt;%= javascript_include_tag "application" %&gt;</code> is before any script loading so that jquery gets loaded first. </p>
  
  <p>This seems really odd. When I load my page I get 2 js errors (in Chrome): </p>
  
  <pre><code>jquery-ui.min.js:17  Uncaught ReferenceError: jQuery is not defined
  jquery.blockUI.js:499  Uncaught ReferenceError: jQuery is not defined
  </code></pre>
  
  <p>Ok, that seems... odd. So I look at my script includes. My first two script includes on my page: </p>
  
  <pre><code> &lt;script src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.9/jquery-ui.min.js"&gt;&lt;/script&gt;
    &lt;script src="http://bainternet-js-cdn.googlecode.com/svn/trunk/js/jQuery%20BlockUI%20Plugin/2.39/jquery.blockUI.js"&gt;&lt;/script&gt;
  </code></pre>
  
  <p>So the first include is getting a javascript error related to itself? That seems unlikely. This looks like a case of a misdirection error (the real error is somewhere else). What can I do to fix this? JS errors on pages look a little unprofessional (at least to other devs). I wasn't getting this error the other day -- even reverted the code to make sure.  </p>