B
B
bood2014-03-01 19:36:52
Ruby on Rails
bood, 2014-03-01 19:36:52

Rails 4, asset pipeline, css concatenation

There is a rails application. There are a lot of css files, a few copyrights, but most are bootstrap and jquery plugins. All of them are crammed into app/assets, lib/assets and vendor/assets directories.
There is an application.css manifest in which all dependencies are registered.
Everything works well as long as config.assets.debug = true.
Everything breaks as soon as I disable debug mode and sprockets starts merging everything into one file.
The resulting file looks fine, all files are there and in the correct order. But the styles are no longer applied. For example, instead of the "ul.ui-autocomplete" rule, "body" is applied to the list item.
Fonts crash...
Javascript files are merged successfully.
In general, tell me how to google.
guides.rubyonrails.org/asset_pipeline.htmlI've been reading for two days now.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
X
XimikS, 2014-03-01
@XimikS

> Everything works well as long as config.assets.debug = true.
You mean in production?
Have you precompiled the assets?
Show Gemfile and enviroments/production.rb at least, otherwise how to guess
if you use cvs, rollback to the previous commit, where everything works.

P
Pozadi, 2014-03-01
@Pozadi

IE has a limit of 4095 selectors per file. Can you run into this limitation?

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question