title: Why are js files in my rails asset pipeline not being compiled?
body: <p>I am experiencing a problem similar to this question: 
  <a href="https://stackoverflow.com/questions/15328569/rails-asset-pipeline-not-including-required-files-in-application-js-manifest">Rails asset pipeline not including required files in application.js manifest</a> However, that question was closed, so I am re-asking it, but with the specifics of my situation.)</p>
  
  <h2>Environment:</h2>
  
  <p>Ruby 2.0.0, Rails 3.2.8, OSX 10.7.5, Chrome 28.0.1500.95</p>
  
  <h2>The main problem I am experiencing</h2>
  
  <p>Files placed in "/app/assets/javascripts" do not appear to be compiling to or appearing in "/public/assets"</p>
  
  <h2>An Example</h2>
  
  <p>If I place a file such as this test.js file in app/assets/javascripts:</p>
  
  <pre><code>  alert("Hello!");
  </code></pre>
  
  <p>and then reload a page in my app, this alert should appear. (I am replicating what Ryan Bates does in his <a href="http://railscasts.com/episodes/279-understanding-the-asset-pipeline" rel="nofollow noreferrer">Railscast on the Asset Pipeline</a> at ~6:30 into the video) However, no alert appears.</p>
  
  <h2>Debugging attempts</h2>
  
  <p>Some tests I did to try to debug this.</p>
  
  <ul>
  <li>(As recommended by @Aidan below) If I "rm -rf public/assets", then
  add "javascript_include_tag 'test'" to my layout, the alert <em>does</em>
  appear. However, maybe because I'm a n00b, I don't know how that
  helps me debug the problem. </li>
  <li>If I add //= require_test to app/javascripts/application.js to my
  manifest file, this does <em>not</em> result in the alert appearing.</li>
  </ul>
  
  <h2>My manifest file (app/javascripts/application.js)</h2>
  
  <pre><code>// This is a manifest file that'll be compiled into application.js, which will include all the files
  // listed below.
  //
  // Any JavaScript/Coffee file within this directory, lib/assets/javascripts, vendor/assets/javascripts,
  // or vendor/assets/javascripts of plugins, if any, can be referenced here using a relative path.
  //
  // It's not advisable to add code directly here, but if you do, it'll appear at the bottom of the
  // the compiled file.
  // removed /sitewide from require_tree
  //
  // WARNING: THE FIRST BLANK LINE MARKS THE END OF WHAT'S TO BE PROCESSED, ANY BLANK LINE SHOULD
  // GO AFTER THE REQUIRES BELOW.
  //
  //= require jquery
  //= require jquery_ujs
  //= require_tree .
  </code></pre>
  
  <h2>My application.rb file</h2>
  
  <pre><code> # Enable the asset pipeline
   config.assets.enabled = true
  </code></pre>
  
  <h2>Rails console output for "y Rails.application.config.assets.paths"</h2>
  
  <pre><code>"/Users/Anders/Dropbox/dev/suggestion-box-app/app/assets/images",
   "/Users/Anders/Dropbox/dev/suggestion-box-app/app/assets/javascripts",
   "/Users/Anders/Dropbox/dev/suggestion-box-app/app/assets/stylesheets",
   "/Users/Anders/.rvm/gems/ruby-2.0.0-p195@suggestion-box-app/gems/coffee-rails-3.2.2/lib/assets/javascripts",
   "/Users/Anders/.rvm/gems/ruby-2.0.0-p195@suggestion-box-app/gems/jquery-rails-3.0.4/vendor/assets/javascripts"
  </code></pre>
  
  <h2>My views/layouts/application.html.haml file</h2>
  
  <pre><code>!!! 5
  %html
    %head
      %meta{:charset =&gt; "utf-8"}/
      %meta{:content =&gt; "width=device-width", :name =&gt; "viewport"}/
      %meta{:content =&gt; "yes", :name =&gt; "apple-mobile-web-app-capable"}/
      %title My App
      %script{:type=&gt;"text/javascript", :src=&gt;"//use.typekit.net/wjb6ybj.js"}
      :javascript
        try{Typekit.load();}catch(e){}
      = stylesheet_link_tag "screen", :media =&gt; "all"
      = csrf_meta_tags
      = javascript_include_tag "application"
    %body
      #container
        = render "layouts/flashes"
        = yield
        = render "layouts/footer"
  </code></pre>
  
  <h2>Source from an app page viewed in localhost:3000</h2>
  
  <pre><code>&lt;!DOCTYPE html&gt;
  &lt;html&gt;
    &lt;head&gt;
      &lt;meta charset='utf-8'&gt;
      &lt;meta content='width=device-width' name='viewport'&gt;
      &lt;meta content='yes' name='apple-mobile-web-app-capable'&gt;
      &lt;title&gt;My app&lt;/title&gt;
      &lt;script src='//use.typekit.net/wjb6ybj.js' type='text/javascript'&gt;&lt;/script&gt;
      &lt;script&gt;
        try{Typekit.load();}catch(e){}
      &lt;/script&gt;
      &lt;link href="/assets/screen.css?body=1" media="all" rel="stylesheet" type="text/css" /&gt;
      &lt;meta content="authenticity_token" name="csrf-param" /&gt;
      &lt;meta content="FqMtH+rs6or9HRx+RL4bWpQyLTNPM8BKLrcf/xZknP8=" name="csrf-token" /&gt;
      &lt;script src="/assets/application.js?body=1" type="text/javascript"&gt;&lt;/script&gt;
    &lt;/head&gt;
    &lt;body&gt;
      &lt;div id='container'&gt;
        ....
      &lt;/div&gt;
    &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <h2>What I see when viewing "localhost:3000/assets/application.js"</h2>
  
  <pre><code>    /*!
   * jQuery JavaScript Library v1.9.1
   * http://jquery.com/
   *
   * Includes Sizzle.js
   * http://sizzlejs.com/
   *
   * Copyright 2005, 2012 jQuery Foundation, Inc. and other contributors
   * Released under the MIT license
   * http://jquery.org/license
   *
   * Date: 2013-2-4
   */
  (function(e,t){function P(e){var t=e.length,n=b.type(e);return b.isWindow(e)?!1:e.nodeType===1&amp;&amp;t?!0:n==="array"||n!=="function"&amp;&amp;(t===0||typeof t=="number"&amp;&amp;t&gt;0&amp;&amp;t-1 in e)}function B(e){var t=H[e]={};return b.each(e.match(E)||[],function(e,n){t[n]=!0}),t}function I(e,n,r,i){if(!b.acceptData(e))return;var s,o,u=b.expando,a=typeof n=="string",f=e.nodeType,c=f?
  </code></pre>
  
  <p>[...remainder of jquery excluded]</p>
  
  <p><em>Should I not see the test.js file here?</em></p>
  
  <p>Any suggestions as to what the problem might be?  Is there any additional info I can provide to help debug this issue? Thanks for any help!</p>