title: Rails 3.1 assets pipeline in production
body: <p>I am using the assets pipeline (in Rails 3.1.3) and am kind of struggling to make it work in production.</p>
  <h2>Situation</h2>
  <p>In my <code>/app/assets/stylesheets</code> directory I have the following files:</p>
  <pre><code>application.css --&gt; this is the default rails one
  stylesheet.css --&gt; This is my custom stylesheet
  </code></pre>
  <p>I spent a lot of time getting my <code>stylesheet.css</code> included in the <code>/public/assets/</code>directory in production (by running <code>rake assets:precompile</code>) and I finally made it by adding the following line into in my <code>application.rb</code> file:</p>
  <pre><code>    config.assets.precompile += ['stylesheet.css']
  </code></pre>
  <p>I know have the right precompiled <code>stylesheet.css</code> file in production.</p>
  <h2>My Problem</h2>
  <p>The problem I have is when using <code>stylesheet_link_tag</code> with my <code>stylesheet.css</code> file. It turns out:</p>
  <p><code>&lt;%= stylesheet_link_tag &quot;stylesheet&quot; %&gt;</code> is resolved into <code>&lt;link href=&quot;/stylesheets/stylesheet.css&quot; media=&quot;screen&quot; rel=&quot;stylesheet&quot; type=&quot;text/css&quot;&gt;</code> <strong>in production</strong> I would expect the path to be resolved into <code>/assets/stylesheet.css</code> <strong>just like it does in development</strong>.</p>
  <p>What is even more surprising is that <code>application.css</code> behaves perfectly even though <code>&lt;%= stylesheet_link_tag &quot;application&quot;%&gt;</code> resolves into <code>&lt;link href=&quot;/stylesheets/stylesheet.css&quot; media=&quot;screen&quot; rel=&quot;stylesheet&quot; type=&quot;text/css&quot;&gt;</code>. What I don't understand is that the public/stylesheets/ directory does not exist in rails 3.1.</p>
  <p>Any idea ?</p>