title: Linking external JS to rails app
body: <p>This should be a simple one but I cant get the syntax quite right.</p>
  
  <p>I also cant find any examples of externally linked files, All search results I've found seem to solve their problems by storing a local copy of the file. </p>
  
  <pre><code>&lt;script src="http://ajax.googleapis.com/ajax/libs/jquery/1.6.2/jquery.min.js" type="text/javascript"&gt;&lt;/script&gt;
  </code></pre>
  
  <p>This is a simple external script tag in my .erb file but rails is not picking up anything that isnt using</p>
  
  <pre><code>&lt;%= javascript_include_tag 'whatever.js' %&gt;
  </code></pre>
  
  <p>How do I externally link up a JS to my rails app.</p>
  
  <p>I cannot store the Jquery.js locally due to technical requirements (I don't understand it either)</p>
  
  <hr>
  
  <pre><code> &lt;%= javascript_include_tag 'http://ajax.googleapis.com/ajax/libs/jquery/1.6.2/jquery.min.js' %&gt;
  </code></pre>
  
  <p>Perhaps the problem wasnt me not referencing the file correctly. It seems to be generated in the html.erb file fine but in the firebug console, I'm getting Jquery not defined.</p>
  
  <pre><code>jQuery is not defined
  [Break On This Error] remText=remText.replace(/\%n/g,charsRe...al:true,allowExceed:false};})(jQuery);
  jquery...9702940 (line 17)
  jQuery is not defined
  [Break On This Error] })(jQuery); 
  protot...0469242 (line 5653)
  </code></pre>
  
  <hr>
  
  <p>The generated HTML links.
  I have no idea why the standard src = tag wont find it.</p>
  
  <pre><code>     &lt;link href="/stylesheets/globalStyleSheet.css?1312383253" media="screen" rel="stylesheet" type="text/css" /&gt;
      &lt;link href="/stylesheets/jquery.inputlimiter.1.0.css?1312464674" media="screen" rel="stylesheet" type="text/css" /&gt;
      &lt;link href="/stylesheets/style.css?1312469715" media="screen" rel="stylesheet" type="text/css" /&gt;
        &lt;script src="/javascripts/prototype.js?1310469242" type="text/javascript"&gt;&lt;/script&gt;
      &lt;script src="/javascripts/effects.js?1310469242" type="text/javascript"&gt;&lt;/script&gt;
      &lt;script src="/javascripts/dragdrop.js?1310469242" type="text/javascript"&gt;&lt;/script&gt;
  
      &lt;script src="/javascripts/controls.js?1310469242" type="text/javascript"&gt;&lt;/script&gt;
      &lt;script src="/javascripts/rails.js?1310469242" type="text/javascript"&gt;&lt;/script&gt;
      &lt;script src="/javascripts/application.js?1310469242" type="text/javascript"&gt;&lt;/script&gt;
  
  
      &lt;link href="/stylesheets/globalStyleSheet.css?1312383253" media="screen" rel="stylesheet" type="text/css" /&gt;
      &lt;link href="/stylesheets/style.css?1312469715" media="screen" rel="stylesheet" type="text/css" /&gt;
      &lt;link href="/stylesheets/jquery.inputlimiter.1.0.css?1312464674" media="screen" rel="stylesheet" type="text/css" /&gt;
      &lt;link href="/stylesheets/globalStyleSheet.css?1312383253" media="screen" rel="stylesheet" type="text/css" /&gt;
  &lt;link href="/stylesheets/jquery.inputlimiter.1.0.css?1312464674" media="screen" rel="stylesheet" type="text/css" /&gt;
  &lt;link href="/stylesheets/style.css?1312469715" media="screen" rel="stylesheet" type="text/css" /&gt;
  
      &lt;script src="/javascripts/jquery.inputlimiter.1.2.2.min.js?1299702940" type="text/javascript"&gt;&lt;/script&gt;
      &lt;script src="/javascripts/globalviewFunctions.js?1312381897" type="text/javascript"&gt;&lt;/script&gt;
  
      &lt;script src="/javascripts/editInPlace.js?1312468960" type="text/javascript"&gt;&lt;/script&gt;
      &lt;script src="/javascripts/errorDisplay.js?1312381897" type="text/javascript"&gt;&lt;/script&gt;
      &lt;script src="/javascripts/journeyViewFunctions.js?1312541017" type="text/javascript"&gt;&lt;/script&gt;
      &lt;script src="/javascripts/pageviewFunctions.js?1312449379" type="text/javascript"&gt;&lt;/script&gt;
      &lt;script src="/javascripts/shaneShowHide.js?1312387899" type="text/javascript"&gt;&lt;/script&gt;
      &lt;script src="http://ajax.googleapis.com/ajax/libs/jquery/1.6.2/jquery.min.js" type="text/javascript"&gt;&lt;/script&gt;
  
      &lt;script src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8/jquery-ui.min.js" type="text/javascript"&gt;&lt;/script&gt;
      &lt;script src="/javascripts/prototype.js?1310469242" type="text/javascript"&gt;&lt;/script&gt;
  &lt;script src="/javascripts/effects.js?1310469242" type="text/javascript"&gt;&lt;/script&gt;
  &lt;script src="/javascripts/dragdrop.js?1310469242" type="text/javascript"&gt;&lt;/script&gt;
  &lt;script src="/javascripts/controls.js?1310469242" type="text/javascript"&gt;&lt;/script&gt;
  &lt;script src="/javascripts/rails.js?1310469242" type="text/javascript"&gt;&lt;/script&gt;
  &lt;script src="/javascripts/application.js?1310469242" type="text/javascript"&gt;&lt;/script&gt;
      &lt;script src="/javascripts/prototype.js?1310469242" type="text/javascript"&gt;&lt;/script&gt;
  
  &lt;script src="/javascripts/effects.js?1310469242" type="text/javascript"&gt;&lt;/script&gt;
  &lt;script src="/javascripts/dragdrop.js?1310469242" type="text/javascript"&gt;&lt;/script&gt;
  &lt;script src="/javascripts/controls.js?1310469242" type="text/javascript"&gt;&lt;/script&gt;
  &lt;script src="/javascripts/rails.js?1310469242" type="text/javascript"&gt;&lt;/script&gt;
  &lt;script src="/javascripts/Legacy.js?1312381897" type="text/javascript"&gt;&lt;/script&gt;
  &lt;script src="/javascripts/editInPlace.js?1312468960" type="text/javascript"&gt;&lt;/script&gt;
  &lt;script src="/javascripts/errorDisplay.js?1312381897" type="text/javascript"&gt;&lt;/script&gt;
  &lt;script src="/javascripts/globalviewFunctions.js?1312381897" type="text/javascript"&gt;&lt;/script&gt;
  &lt;script src="/javascripts/journeyViewFunctions.js?1312541017" type="text/javascript"&gt;&lt;/script&gt;
  
  &lt;script src="/javascripts/jquery.inputlimiter.1.2.2.min.js?1299702940" type="text/javascript"&gt;&lt;/script&gt;
  &lt;script src="/javascripts/jquery.min.js?1312544046" type="text/javascript"&gt;&lt;/script&gt;
  &lt;script src="/javascripts/pageviewFunctions.js?1312449379" type="text/javascript"&gt;&lt;/script&gt;
  &lt;script src="/javascripts/shaneShowHide.js?1312387899" type="text/javascript"&gt;&lt;/script&gt;
  &lt;script src="/javascripts/application.js?1310469242" type="text/javascript"&gt;&lt;/script&gt;
  </code></pre>