List manifest locations when asset is not found #468
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
When using an asset manifest file
config.assets.compile = false
the developer might not know that aassets:precompile
manifest file is being used, or they might not know which file (if there are multiple). To help debug this situation we can detect which asset resolution strategies contain a "file" and output the location of that file:I lost about 30 minutes debugging an error I was seeing locally while running with RAILS_ENV=production. It was telling me a file "was not present in the asset pipeline" which I took to mean it wasn't in
app/assets
or maybe the config declaration was wrong. Everything looked right, it wasn't until much later I realized that I had somehow gotten an old manifest file generated from an olderassets:precompile
run so it was checking that file to see if the asset was "present in the pipeline".By adding the location of the manifest file to the output, it's more likely that I would have realized that sprockets was only checking that file and that the solution was to re-generate it.