title: Rails 3.2 Asset Pipeline with Thin and Apache, not finding assets
body: <p>My question is similar to this one <a href="https://stackoverflow.com/questions/9162378/rails-3-2-asset-pipeline-with-passenger-endless-errors">Rails 3.2 Asset Pipeline with Passenger Endless Errors</a> except that when I try to actually go to </p>
  
  <pre><code>&lt;link href="/assets/application-eed7996ee9017637f923133371ab3e92.css" media="all" rel="stylesheet" type="text/css" /&gt;
  </code></pre>
  
  <p>I get a 404. Here's the thing I don't understand. It is looking in /assets/, but when I look at the code that was deployed, the assets are only in /public/assets, which is actually a symlink to /var/www/myapp/shared/assets. So what in the world is responsible for telling the app that looking in /assets will produce correct results??</p>
  
  <p>I am using Rails 3.2.0, ruby-1.9.3-p125, deploying to Ubuntu, Apache, and Thin.</p>
  
  <p><strong>I should clarify:</strong> My assets are indeed deployed to the server. Everything works perfectly fine until they need to be served, in which case production.log tells me it's looking for them in /assets/application-eed7996ee9017637f923133371ab3e92.css, which 404's. </p>
  
  <p>For every request my <strong>thin.log</strong> says</p>
  
  <pre><code>cache: [GET /] miss
  </code></pre>
  
  <p>and <strong>production.log</strong> says</p>
  
  <pre><code>ActionController::RoutingError (No route matches [GET] "/assets/application-abecf2e096af9ee80697fd49e79a55e7.js"):
  </code></pre>
  
  <p><strong>UPDATE</strong>
  @Brandan thanks for the help. My assets are indeed in <code>RAILS_ROOT/public/assets</code>. I put this in my Apache vhost file:</p>
  
  <pre><code>DocumentRoot /var/rails/myappname/current/public
  
  RewriteEngine On
  XSendFile On
  XSendFilePath /var/rails/myappname #not even sure if this line is needed
  
  &lt;LocationMatch "^/assets/.*$"&gt;
      Header unset ETag
      FileETag None
      ExpiresActive On
      ExpiresDefault "access plus 1 year"
  &lt;/LocationMatch&gt;
  </code></pre>
  
  <p>My <strong>RAILS_ROOT/config/environments/production.rb</strong> settings:</p>
  
  <pre><code>config.cache_classes = true
  config.consider_all_requests_local = false
  config.action_controller.perform_caching = true
  config.serve_static_assets = false
  config.assets.compress = true
  config.assets.compile = false
  config.assets.digest = true
  config.action_dispatch.x_sendfile_header = "X-Sendfile" # for apache
  </code></pre>