在生产模式下的rails资产预编译期间使用angular-material的CSS错误

时间:2016-06-22 06:23:52

标签: css ruby-on-rails angularjs angular-material

我在生产模式下预编译资产时遇到以下错误。由于源自angular-material css文件的css错误,我的角度材质资源未进行预编译

I, [2016-06-22T11:39:54.818758 #25775]  INFO -- : Writing /Users/rahulnayak/tiwi/public/assets/angular-material/modules/layouts/angular-material.layouts-7a618db829d488648f5eb191c93df5ac6788211b76c70cf4184c58d624536d41.css.gz
rake aborted!
Sass::SyntaxError: Invalid CSS after "and ": expected "{", was "(max-width: 599..."
(sass):25

罪魁祸首似乎是文件angular-material.layouts.ie_fixes.css,当我删除此文件时,Assets无缝编译。但是我觉得没有正确的解决方案。

...    
@media screen\0
and (max-width: 599px) {
    .flex-xs {
        -webkit-flex: 1 1 0%;
        -ms-flex: 1 1 0%;
        flex: 1 1 0%;
    }
}
...

这是我的application.rb文件

config.assets.paths << Rails.root.join('vendor', 'assets', 'bower_components')
config.active_record.raise_in_transactional_callbacks = true
config.generators.assets = false
config.generators.helper = false    
config.generators.template_engine = false
config.assets.precompile += %w( *.js *.css ) 

环境/ production.rb

config.serve_static_files = ENV['RAILS_SERVE_STATIC_FILES'].present?
config.assets.js_compressor = :uglifier
config.assets.css_compressor = :sass
config.assets.compile = false

这是凉亭列表的输出

├─┬ AngularDevise#1.3.0
│ └── angular#1.5.3 (1.5.8-build.4898+sha.78e1ba1 available)
├── angular#1.5.3 (1.5.8-build.4898+sha.78e1ba1 available)
├─┬ angular-bootstrap#1.3.3
│ └── angular#1.5.3 (1.5.8-build.4898+sha.78e1ba1 available)
├── angular-cookie#4.1.0
├─┬ angular-google-maps#2.3.3
│ ├── angular#1.5.3 (1.5.8-build.4898+sha.78e1ba1 available)
│ ├─┬ angular-simple-logger#0.1.7
│ │ └── angular#1.5.3 (1.5.8-build.4898+sha.78e1ba1 available)
│ ├── google-maps-utility-library-v3-infobox#1.1.14
│ ├── google-maps-utility-library-v3-keydragzoom#2.0.9
│ ├── google-maps-utility-library-v3-markerwithlabel#1.1.10
│ ├── js-rich-marker#4b6f4df749
│ ├── lodash#4.13.1
│ └── markerclustererplus#2.1.4
├─┬ angular-material#04dbd7e248
│ ├── angular#1.5.3 (1.5.8-build.4898+sha.78e1ba1 available)
│ ├─┬ angular-animate#1.5.7 (1.5.8-build.4898+sha.78e1ba1 available)
│ │ └── angular#1.5.3 incompatible with 1.5.7 (1.5.7 available, latest is 1.5.8-build.4898+sha.78e1ba1)
│ ├─┬ angular-aria#1.5.7 (1.5.8-build.4898+sha.78e1ba1 available)
│ │ └── angular#1.5.3
│ └── angular-messages#1.5.7 (1.5.8-build.4897+sha.78e1ba1 available)
├─┬ angular-messages#1.5.7 (1.5.8-build.4897+sha.78e1ba1 available)
│ └── angular#1.5.3
├─┬ angular-sanitize#1.5.7 (1.5.8-build.4897+sha.78e1ba1 available)
│ └── angular#1.5.3
├─┬ angular-ui-bootstrap-bower#1.3.3
│ └── angular#1.5.3
├─┬ angular-ui-router#0.2.18 (latest is 1.0.0-alpha.5)
│ └── angular#1.5.3 (1.5.8-build.4898+sha.78e1ba1 available)
├─┬ bootstrap#3.3.6 (latest is 4.0.0-alpha.2)
│ └── jquery#2.2.4 (latest is 3.0.0)
├── cb59b08866c9c968ffdcac56684b16fd4823cea7 extraneous
├── material-design-icons#2.2.3
└─┬ ng-token-auth#0.0.29
  ├── angular#1.5.3 (latest is 1.5.8-build.4898+sha.78e1ba1)
  └─┬ angular-cookie#4.1.0
    └── angular#1.5.3 (1.5.8-build.4898+sha.78e1ba1 available)

任何帮助都将受到高度赞赏 感谢

0 个答案:

没有答案