Found a strange bug in Ruby on Rails 4.1 asset pipeline on Heroku. All of my PNG images are not being compiled.
In Development:
image_tag('icons/example.png')
# => "/assets/icons/example-09adfasdfa7sfhpasodfuahsdas.png"
In Production on Heroku
image_tag('icons/example.png')
# => "/images/icons/example.png"
I have never run across anything like this in the asset pipeline. Any ideas as to why?
Update
As it turns out, it's not PNG images in particular. It is any image accessed via image_tag
. Any images that are precompiled in CSS and Javascript point to the proper paths, but any views/helpers that use image_tag
(and thus path_to_image
) are pointing to the /images
. I cannot tell if this has to do with the serve_static_assets
configuration that Heroku recommends that is not playing well with Rails 4.1