title: Why do I get "no route matches" for requests to the asset pipeline?
body: <p>I'm working on upgrading an app to use Rails 3.1 and I'm trying to use the asset pipeline. As a test, I've added <code>foobar.js</code> to <code>app/assets/javascripts</code>.</p>
  <h2>The Setup</h2>
  <p>In <code>application.rb</code>, I've added <code>config.assets.enabled = true</code>. Going on <a href="http://ryanbigg.com/guides/asset_pipeline.html#adding-assets-to-your-gems" rel="nofollow noreferrer">this guide</a>, I think that's all I have to do.</p>
  <h2>Checking it out</h2>
  <p>If I load the console and check <code>Rails.application.config.assets.paths</code>, I do see <code>app/assets/javascripts</code> in the load path. Also, if I check <code>MyAppName::Application.assets</code>, I get back a <code>Sprockets::Environment</code> object which has the same paths.</p>
  <p>That all looks good to me.</p>
  <h2>Trying to use it</h2>
  <p>In a view, I'm using <code>javascript_include_tag('foobar')</code>. That outputs the following HTML: <code>&lt;script src=&quot;/javascripts/foobar.js&quot; type=&quot;text/javascript&quot;&gt;&lt;/script&gt;</code></p>
  <h2>The error</h2>
  <p>Following that link gets me an error: <code>No route matches [GET] &quot;/javascripts/foobar.js&quot;</code></p>
  <p><strong>Is there a piece of setup I'm missing?</strong></p>
  <hr />
  <h2>Misc Details</h2>
  <p>I'm currently using:</p>
  <ul>
  <li>ruby-1.9.2-p290</li>
  <li>rails-3.1.0.rc6</li>
  <li>sprockets-2.0.0.beta.14 (required by Rails)</li>
  </ul>