Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

rails 3.1 asset pipeline: *.css isn't precompiled, but it's in the manifest

Setup

  • error.sass is under app/assets/stylesheets
  • I ran bundle exec rake assets:precompile
  • error.css is in the manifest error.css: error-8f9fb7a53be409476d28603c33a7cd1d.css

Problem

error.css isn't precompiled

Other odd things that may indicate problems with my setup

  • In [environment].rb config.assets.compile = false. This is desired. When I turn it to true it works, but I don't want live compile
  • Everytime I load a page public/stylesheet gets generated with all the scss/sass files (but not css)
  • This is an upgrade from rails 3.0, but I think the upgrade was succssful

Help?!

like image 454
phillee Avatar asked Dec 13 '11 09:12

phillee


2 Answers

By default css and js files (except application.js and application.css) are not precompiled. It looks like you can add config.assets.precompile += %w( errors.css ) to fix your issue. Also, there's more info about precompiling here: http://guides.rubyonrails.org/asset_pipeline.html#precompiling-assets

like image 156
Alex Dixon Avatar answered Oct 19 '22 19:10

Alex Dixon


Have you tried restarting the server after you precompiled the assets? The server will stick to the manifest.yml it had when you started the server.

(I know it's a late answer but I just had the problem :) )

like image 21
amencarini Avatar answered Oct 19 '22 19:10

amencarini