So I got an application based on rails (7.0.8.3)
Using bowerfile I've installed some additional js libs including jquery ui I've included a jquery-ui css styles into my application.css by sprockets directive
*=require jquery-ui/themes/base/core.css *=require jquery-ui/themes/base/datepicker.css *=require jquery-ui/themes/smoothness/theme.css
those libs are installed to vendor/assets/bower_components/
directory . In the stylesheets some images are referred as url(images/bg.png)
The path to the image is relative to the stylesheet file
In the dev url is 404, since there is no such file in the public directory (the files lives in jquery-ui/themes/smoothness/theme/images
).
Since the whole setup is not something very rare in dev process, I'm wondering what I did wrong and what is "standard" way of including the 3rd party css that refers assets living deep in the vendor's lib folder?
url()
references. If you want to link to fingerprinted assets from the pipeline you would need to use ERB to interpolate the URLs into the compiled CSS or use a pre-compiler such as SASS that performs the same steps. If you want to use this old junk I would just ignore the assets pipeline and serve the assets directly from the public directory or the web server. github.com/rails/…