title: Mojolicious gives 404 when getting JS and CSS
body: <p>I'm new to Mojolicious, and I've got various things working, but I've come up against a problem which I've recreated in the following minimal bit of code.</p>
  
  <p>The problem is a simple one: I can't get it to load external CSS and JS files.  What surprises me is that it gives 404 errors as though it's trying to serve these static files as routes.  No-one else seems to be having this problem, so I've obviously done something (or missed something) foolish.</p>
  
  <p>The files in question are in the ./css and ./js directories relative to the perl file (errorddemo.pl).  I've tried with and without the leading '/', and any other variations that I could think of.</p>
  
  <p>This is the code:</p>
  
  <pre><code>#!/usr/bin/env perl
  use Mojolicious::Lite;
  get '/' =&gt; sub {
      my $c = shift;                                                     
      $c-&gt;render('index');
  };            
  app-&gt;start;
  
  __DATA__
  @@ index.html.ep
  &lt;!DOCTYPE html&gt;
  &lt;html&gt;
      %= stylesheet '/css/bootstrap-3.3.2-dist/css/bootstrap.css'
  &lt;/head&gt;      
  &lt;body&gt;
      &lt;p&gt;blah
      %= javascript '/js/jquery-2.1.3.js'
  &lt;/body&gt;     
  &lt;/html&gt;
  </code></pre>
  
  <p>When I run <code>morbo errordemo.pl</code> and browse to :3000, I get this:</p>
  
  <pre><code>[Sun Jan 25 00:24:04 2015] [debug] GET "/".
  [Sun Jan 25 00:24:04 2015] [debug] Routing to a callback.
  [Sun Jan 25 00:24:04 2015] [debug] Rendering template "index.html.ep" from DATA section.
  [Sun Jan 25 00:24:04 2015] [debug] 200 OK (0.005127s, 195.046/s).
  [Sun Jan 25 00:24:04 2015] [debug] GET "/css/bootstrap-3.3.2-dist/css/bootstrap.css".
  [Sun Jan 25 00:24:04 2015] [debug] Template "not_found.development.html.ep" not found.
  [Sun Jan 25 00:24:04 2015] [debug] Template "not_found.html.ep" not found.
  [Sun Jan 25 00:24:04 2015] [debug] Rendering inline template "3e3201ab0667c1fc7f39089209f0435c".
  [Sun Jan 25 00:24:04 2015] [debug] Rendering inline template "b2d451b47e2053ce583cbfdf7bcc6006".
  [Sun Jan 25 00:24:04 2015] [debug] 404 Not Found (0.045663s, 21.900/s).
  [Sun Jan 25 00:24:04 2015] [debug] GET "/js/jquery-2.1.3.js".
  [Sun Jan 25 00:24:04 2015] [debug] Template "not_found.development.html.ep" not found.
  [Sun Jan 25 00:24:04 2015] [debug] Template "not_found.html.ep" not found.
  [Sun Jan 25 00:24:04 2015] [debug] Rendering cached inline template "3e3201ab0667c1fc7f39089209f0435c".
  [Sun Jan 25 00:24:04 2015] [debug] Rendering cached inline template "b2d451b47e2053ce583cbfdf7bcc6006".
  [Sun Jan 25 00:24:04 2015] [debug] 404 Not Found (0.009863s, 101.389/s).
  </code></pre>
  
  <p>The generated HTML is:</p>
  
  <pre><code>&lt;!DOCTYPE html&gt;
  &lt;html&gt;
      &lt;link href="/css/bootstrap-3.3.2-dist/css/bootstrap.css" rel="stylesheet" /&gt;
  &lt;/head&gt;
  &lt;body&gt;
      &lt;p&gt;blah
      &lt;script src="/js/jquery-2.1.3.js"&gt;&lt;/script&gt;
  &lt;/body&gt;
  </code></pre>
  
  <p></p>