I am working on a Rails 3.1 app that makes use of CoffeeScript. As a new Rails developer, I have been making changes to some configuration to try to make the most of the asset pipeline and Heroku.
However, I am now in a position whereby, no matter what changes I make to the app/assets/javascripts/*.js.coffee files, the local Rails development server refused to pick up those changes and recompile the app. The only way I can trigger recompilation of .js.coffee files is to stop WEBrick and restart it.
This problem does not seem to affect my pushes to Heroku, however. Those seem to recompile just fine.
Some details on my setup:
- I do not compile assets locally with rake assets:precompile. Instead, I use the "#2 compiling assets during slug compilation" method described here.
The relevant parts of my Gemfile look like this:
gem 'rails', '3.2.3' gem 'rake', '0.9.2.2' gem 'activesupport', '~> 3.2.3' gem 'json' group :assets do gem 'sass-rails', '~> 3.2.3' gem 'coffee-rails', '~> 3.2.1' .. end
My config/environments/development.rb has these relevant (I think) lines. If something here looks odd, I don't really recall why the change was made (though perhaps I documented something in my SCM).
config.consider_all_requests_local = true config.action_controller.perform_caching = false # Print deprecation notices to the Rails logger config.active_support.deprecation = :log # Only use best-standards-support built into browsers config.action_dispatch.best_standards_support = :builtin # Do not compress assets config.assets.compress = false # Expands the lines which load the assets config.assets.debug = true config.assets.compile = true config.serve_static_assets = true # Generate digests for assets URLs config.assets.digest = true
Any thoughts on what to look for? Thanks.