jeudi 19 janvier 2017

Rails 3.2 Asset Precompile is skipping files

Stack

  • Ruby 1.9.3
  • Rails 3.2.12

Issue

We have precompilation issues with our application.

We're trying to remove config.server_static_files = true and config.assets.compile = true from our production configs, but are constantly missing assets whenever we precompiled. Even though theses assets live in app/assets, while other files in the same directory are compiled fine.

Ex:

app/assets/stylesheets/application.css
app/assets/stylesheets/some_slider_lib.css
app/assets/stylesheets/bootstrap.min.css

After precompiling

public/assets/application-xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx.css
public/assets/some_slider_lib-xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx.css

And the manifest.yml is also missing the bootstrap file among other assets.

Same thing with our vendor folder.

Attempts

The following is the only way that I've managed to precompiles everything.

config.assets.precompile += ["*.css", "*.scss", "*.js", "*.coffee"]

However, this feels like overkill for something that, I think, should happen already.

If anyone could provide a little guidance, suggestions or more it would be deeply appreciated.

Thanks!

Aucun commentaire:

Enregistrer un commentaire