Rails 3.1 Asset pipeline - IE not loading all stylesheets in development
Testing my site in Internet Explorer (testing with IE 9 at the moment) I saw many things wrong but quite a few things that I thought shouldn't be wrong.
It turns out that IE isn't applying all the stylesheets in development mode (verified by adding a body { border: 10px solid blue; }
rule to one of the stylesheets).
I've opened up the development tools and done network capturing and it reports they're all loaded (result: 304).
I've tried running the server both thr开发者_JAVA百科ough Webrick & thin.
Only thing I can think is it's just too many stylesheets for IE to cope with. The only way I've got it to work is by pre-compiling the assets and running the server in production mode. But this is of course far from ideal.
Yuck IE imposes a 31 stylesheet limit: http://social.msdn.microsoft.com/Forums/en-US/iewebdevelopment/thread/ad1b6e88-bbfa-4cc4-9e95-3889b82a7c1d/
The only way I found around this in development is to change my settings to:
config.assets.compile = true
config.assets.debug = false
Certain comments inside css files can also prevent them from loading in IE6 and IE7 (IE8 seems ok). Comments with quotes, like for a font style, will prevent it from loading.
A comment such as the one below, with quotes inside, will prevent the file from loading:
/* ‘Lucida Sans Unicode’ */
精彩评论