I have both .js
and .coffee
files in my /app/assets/javascripts/
folder. The .coffee
files will not run unless I call rake assets:precompile
, which is a pain because I have to do rake assets:clean
and precompile them again whenever I make a change.
Also, the precompiled .js file is included in addition to the source files, which causes double event handlers and all that good stuff.
My understanding is that the coffeescript should be compiled to javascript upon each request if it's not precompiled, but it doesn't seem to be doing so. I can't find the compiled script loading in Firebug, and I don't see its behavior, at least.
My /config/application.rb
has the following line configured:
# Enable the asset pipeline
config.assets.enabled = true
What else is there to check?
I am using Rails 3.2.3.