I have a Rails 3.2.11 running on the Heroku Cedar stack. I don’t compile assets locally, they are compiled automatically during slug compilation, as described here. I have just created a new CSS manifest file app/assets/stylesheets/new_manifest.css.scss in addition to the default application.css.scss. When I push to Heroku, this manifest file is not getting compiled like application.css.scss is. The new manifest file works fine in development. Why would that be happening?
application.rb
config.assets.enabled = true
config.assets.version = '1.0'
config.assets.initialize_on_precompile = false
production.rb
config.assets.compile = false
config.serve_static_assets = false
config.assets.compress = true
config.assets.digest = true
Console output from Heroku push
-----> Preparing app for Rails asset pipeline
Running: rake assets:precompile
Asset precompilation completed (83.62s)
Sample page
<%= stylesheet_link_tag "new_manifest", media: "all" %>
The solution was to add
config.assets.precompile += %w( new_manifest.css )to production.rb, as described here. This isn’t required in development, but is required in production, which caused my confusion.