I have several CSS files that reference images using relative paths such as url( "../img/my_image.jpg" ).
Everything works in development, but in the productionenvironment, since all CSS files are packed into one file and the structure is lost, as well as the paths of relatives are lost, and the images were not found.
Details of my structure
I have an asset structure like this:
/app
/assets
/plugins
/my_plugin
/img
my_image.jpg
/css
my_css.css
( /my_plugincan be any plug-in, which is a group of files css, jsand images, like Twitter Bootstrap, any other)
As /app/assets/plugins/my_plugin/my_css.cssI have something like:
background-image: url("../img/my_image.jpg");
In /app/assets/stylesheets/application.css:
*= require css/my_css.css
And finally, in headmy file html:
<%= stylesheet_link_tag "application" %>
What should I do to fix the problem?
Update
- , README .