My mind is spinning with frustration over this issue... I feel like I've exhausted every possible solution involving Sass files, ERB files, asset helpers, image helpers, and more. Can someone please offer some fresh ideas?
Situation:
In Rails apps, asset helpers are necessary to ensure that when assets are precompiled, the source refers to a fingerprinted asset file. For instance, instead of simply calling img src="X.jpg", in production the site would actually look for X-as;diofua;wemfiwaejfoiawefo.jpg in public/assets due to fingerprinting. The only way to access that fingerprinted file is through an asset helper, like image_url ('X.jpg').
Currently on my live site, I'm using an asset helper, but strangely it's not directing to the fingerprinted asset file. It's important to note that the assets work fine in development (since no fingerprint is added during development).
Code Snippet:
The image "classic-map.png" is located in app/assets/images/galleria.
This image is called from a css.erb file required in the application.css file. In the css.erb file, I have the following code:
background-image: url(<%= asset_path 'galleria/classic-map.png' %>);
For further information, refer to http://guides.rubyonrails.org/asset_pipeline.html. Just to clarify, I chose to write this as a css.erb file, hence using asset_path instead of asset-path. Initially, I suspected interpolation might be the problem, but upon inspecting the page source, the URL is functioning properly. The only issue is that it's pointing to url(galleria/classic-map.png) instead of url(galleria/classic-map-apsoidufalskjf;kasj.png).
A huge thank you to anyone who can provide assistance!