In both development and production my app seems to work fine. However, I noticed it was making some requests for CSS files that were returning with 404s.
Rails 3.1.1
Heroku “Cedar” stack
the compiled production CSS “application-b3ce81dc0178ccf6b6ac77b8bc7774ef.css” begins with..
@import url(jquery.ui.base.css);@import url(jquery.ui.theme.css);@import url("jquery.ui.core.css");@import url("jquery.ui.autocomplete.css");
namely – the files that are resulting in 404s so it looks like I’m directly requesting files that have already been compiled into the application.css
application.css.scss:
/*
*= require vendor
*= require_self
*= require_tree .
*/
@import "bootstrap";
.. some more regular CSS ..
removing the require vendor line gets rid of the duplicate requests, but also results in my site missing required styles..
Any ideas?
You cannot use the CSS import with the asset pipeline as the files are not available normally, only via their fingerprinted versions.
You need to have the correct files in your application.css (via the manifest in
application.css.scss) or use the Sass helpers to put the correct asset URLs in your code.http://guides.rubyonrails.org/asset_pipeline.html#coding-links-to-assets