Why are js files in my rails asset pipeline not being compiled? Why are js files in my rails asset pipeline not being compiled? ruby-on-rails ruby-on-rails

Why are js files in my rails asset pipeline not being compiled?


The problem appears to have been related to my rails/gem versions. After updating from Rails 3.2.8 to Rails 3.2.14 (which also required updating the rack gem from 1.4.1 to 1.4.5) the issue was resolved and items in assets/javascripts are now being compiled/added to public/assets. Note that I created a completely new gemset as part doing this, so the issue may have had nothing to do with the Rails version and simply was a questions of a "corrupted" gem set that needed to be re-created.


Rails will compile all the targets listed in config.assets.precompile. These targets will be compiled to public/assets/. That config item already includes "application.js" and other some targets, so you need to add any other targets you want to be precompiled to public/assets/. The source file to be compiled for any particular target are automatically computed based on the name of the target; e.g., a target of test.js would be compiled from app/assets/javascripts/test.js or from app/assets/javascripts/test.js.coffee, whichever exists.