I am getting the following error:
Sprockets::Helpers::RailsHelper::AssetPaths::AssetNotPrecompiledError in Photos#edit
Showing .../app/views/photos/_form.html.haml where line #49 raised:
taxonomy/focus-building.jpg isn't precompiled
Extracted source (around line #49):
46: = focus.code
47: .tooltip
48: %span.name= focus.name
49: = image_tag("taxonomy/focus-#{focus.code.downcase.dehumanize}.jpg")
50: / Help Overlay
51: .help
52: %a.overlay{:href=>"#", :rel=>'#help-focus'} Learn more about focus
This image file is located in app/assets/images/taxonomy/focus-building.jpg
. I have run rake assets:precompile RAILS_ENV=production
, but as far as I can tell the images are not being copied to the public/assets
directory.
Strangely, all assets that are referred to in SCSS using image-url()
work fine. Why does this image report not being precompiled when referred to with image_tag
?
If you have the assets.digest option enabled this will add a hash at the end of the name and so a static reference to that file will no longer work, change any statically-referenced assets so that they use the helper methods.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With