spree/spree — Issue #771: jstree CSS missing from public/assets after precompiling
Author: DavidOliver
Created: 2011-11-16 00:27:15+00:00
State: open

`/public/assets/jquery.jstree/themes/apple/style.css` doesn't get precompiled in production when in `config/environments/production.rb`:

config.serve_static_assets = false
config.assets.compile = false

The images in `/assets/jquery.jstree/themes/apple/` are precompiled, but the CSS isn't. I noticed because the background image for the taxon icons (expand/collapse, etc.) was not appearing.

I've turned `config.assets.compile` to true to get round the issue for now.

This is in Spree 0.70.1, Rails 3.1.1, Ruby 1.9.2.

Radar talked through this in the IRC channel and found out that it's the CSS that was missing, and has the same/a similar issue. I'm quoting some of Radar's comments to give info/context:

> You're running on a server that doesn't have the asset pipeline serving assets out of the Rails process. What would happen there is that your webserver (Apache or nginx) would go looking for these assets in public/assets and if it can't find it then it gives up.
Weird that the asset isn't being copied over

>I don't even have a public/assets/store directory. And public/assets/admin does not contain that CSS file at all

(Although my main store and admin CSS files were precompiling fine, this didn't seem to be the case for Radar.)

>Ok, appears to be that it's not honouring the precompile setting in the initializer. At least we know *what* the problem is now.

>I meant this one: https://github.com/spree/spree/blob/master/core/lib/spree/core/engine.rb#L61
Which is this line in 0.70: https://github.com/spree/spree/blob/0-70-stable/core/lib/spree_core/railtie.rb#L59