title: Rails 3 Engine & Static assets
body: <p>I'm building an engine I've bundled as a gem (gmaps4rails). I copied the /public of my engine in the /public of my rails app.</p>
  
  <p>Everything works fine in development but fails to work in production: it appears static assets (of my engine &amp; my main app) aren't found.</p>
  
  <p>The logs tell the following (just an abstract):</p>
  
  <pre><code>Started GET "/javascripts/application.js?1286294679" for 127.0.0.1 at Wed Nov 24 00:22:20 +0100 2010
  
  ActionController::RoutingError (No route matches "/javascripts/application.js"):
  
  
  Rendered /Users/me/.rvm/rubies/ree-1.8.7-2010.02/lib/ruby/gems/1.8/gems/actionpack-3.0.3/lib/action_dispatch/middleware/templates/rescues/routing_error.erb within rescues/layout (1.1ms)
  
  
  Started GET "/stylesheets/gmaps4rails.css?1290554221" for 127.0.0.1 at Wed Nov 24 00:22:20 +0100 2010
  
  ActionController::RoutingError (No route matches "/stylesheets/gmaps4rails.css"):
  </code></pre>
  
  <p>I've done a few things:</p>
  
  <ol>
  <li><p>in my app's production.rb, I set:</p>
  
  <p>config.serve_static_assets = true</p>
  
  <p>This Solves the problem but is not elegant enough, I'd like to keep it to false and add configuration in the engine :)</p></li>
  <li><p>I followed the advice <a href="http://piotrsarnacki.com/2010/09/14/mountable-engines/" rel="nofollow"> here </a> without success.</p></li>
  </ol>