这似乎是一个非常尴尬的错误。 rake asset:precompile
存在很多问题,但我没有发现任何与此问题类似的Sass语法错误。我不知道这个错误发生在哪个文件中。
我正在使用rails 5.
root @ 006230dae323:〜/ myhomerails#rake assets:precompile --trace RAILS_ENV = production
** Invoke assets:precompile (first_time)
** Invoke assets:environment (first_time)
** Execute assets:environment
** Invoke environment (first_time)
** Execute environment
** Execute assets:precompile
rake aborted!
Sass::SyntaxError: Invalid CSS after " color: ": expected expression (e.g. 1px, bold), was ";"
(sass):13586
这是日志的其余部分:
rake aborted!
Sass::SyntaxError: Invalid CSS after " color: ": expected expression (e.g. 1px, bold), was ";"
(sass):13586
/usr/local/bundle/gems/sass-3.4.22/lib/sass/scss/parser.rb:1189:in `expected'
/usr/local/bundle/gems/sass-3.4.22/lib/sass/script/lexer.rb:229:in `expected!'
/usr/local/bundle/gems/sass-3.4.22/lib/sass/script/parser.rb:704:in `assert_expr'
/usr/local/bundle/gems/sass-3.4.22/lib/sass/script/parser.rb:75:in `parse'
/usr/local/bundle/gems/sass-3.4.22/lib/sass/scss/parser.rb:1051:in `sass_script'
/usr/local/bundle/gems/sass-3.4.22/lib/sass/scss/parser.rb:897:in `value!'
/usr/local/bundle/gems/sass-3.4.22/lib/sass/scss/parser.rb:769:in `block in try_declaration'
/usr/local/bundle/gems/sass-3.4.22/lib/sass/scss/parser.rb:1165:in `call'
/usr/local/bundle/gems/sass-3.4.22/lib/sass/scss/parser.rb:1165:in `rethrow'
/usr/local/bundle/gems/sass-3.4.22/lib/sass/scss/parser.rb:782:in `try_declaration'
/usr/local/bundle/gems/sass-3.4.22/lib/sass/scss/parser.rb:711:in `declaration_or_ruleset'
/usr/local/bundle/gems/sass-3.4.22/lib/sass/scss/parser.rb:676:in `block_child'
/usr/local/bundle/gems/sass-3.4.22/lib/sass/scss/parser.rb:665:in `block_contents'
/usr/local/bundle/gems/sass-3.4.22/lib/sass/scss/parser.rb:657:in `block'
/usr/local/bundle/gems/sass-3.4.22/lib/sass/scss/parser.rb:649:in `ruleset'
/usr/local/bundle/gems/sass-3.4.22/lib/sass/scss/parser.rb:675:in `block_child'
/usr/local/bundle/gems/sass-3.4.22/lib/sass/scss/parser.rb:668:in `block_contents'
/usr/local/bundle/gems/sass-3.4.22/lib/sass/scss/parser.rb:125:in `stylesheet'
/usr/local/bundle/gems/sass-3.4.22/lib/sass/scss/parser.rb:41:in `parse'
/usr/local/bundle/gems/sass-3.4.22/lib/sass/engine.rb:406:in `_to_tree'
/usr/local/bundle/gems/sass-3.4.22/lib/sass/engine.rb:281:in `render'
/usr/local/bundle/gems/sprockets-3.7.0/lib/sprockets/sass_compressor.rb:48:in `call'
/usr/local/bundle/gems/sprockets-3.7.0/lib/sprockets/sass_compressor.rb:28:in `call'
/usr/local/bundle/gems/sprockets-3.7.0/lib/sprockets/processor_utils.rb:75:in `call_processor'
/usr/local/bundle/gems/sprockets-3.7.0/lib/sprockets/processor_utils.rb:57:in `block in call_processors'
/usr/local/bundle/gems/sprockets-3.7.0/lib/sprockets/processor_utils.rb:56:in `reverse_each'
/usr/local/bundle/gems/sprockets-3.7.0/lib/sprockets/processor_utils.rb:56:in `call_processors'
/usr/local/bundle/gems/sprockets-3.7.0/lib/sprockets/loader.rb:134:in `load_from_unloaded'
/usr/local/bundle/gems/sprockets-3.7.0/lib/sprockets/loader.rb:60:in `block in load'
/usr/local/bundle/gems/sprockets-3.7.0/lib/sprockets/loader.rb:317:in `fetch_asset_from_dependency_cache'
/usr/local/bundle/gems/sprockets-3.7.0/lib/sprockets/loader.rb:44:in `load'
/usr/local/bundle/gems/sprockets-3.7.0/lib/sprockets/cached_environment.rb:20:in `block in initialize'
/usr/local/bundle/gems/sprockets-3.7.0/lib/sprockets/cached_environment.rb:47:in `yield'
/usr/local/bundle/gems/sprockets-3.7.0/lib/sprockets/cached_environment.rb:47:in `load'
/usr/local/bundle/gems/sprockets-3.7.0/lib/sprockets/base.rb:66:in `find_asset'
/usr/local/bundle/gems/sprockets-3.7.0/lib/sprockets/base.rb:73:in `find_all_linked_assets'
/usr/local/bundle/gems/sprockets-3.7.0/lib/sprockets/manifest.rb:142:in `block in find'
/usr/local/bundle/gems/sprockets-3.7.0/lib/sprockets/legacy.rb:114:in `block (2 levels) in logical_paths'
/usr/local/bundle/gems/sprockets-3.7.0/lib/sprockets/path_utils.rb:228:in `block in stat_tree'
/usr/local/bundle/gems/sprockets-3.7.0/lib/sprockets/path_utils.rb:212:in `block in stat_directory'
/usr/local/bundle/gems/sprockets-3.7.0/lib/sprockets/path_utils.rb:209:in `each'
/usr/local/bundle/gems/sprockets-3.7.0/lib/sprockets/path_utils.rb:209:in `stat_directory'
/usr/local/bundle/gems/sprockets-3.7.0/lib/sprockets/path_utils.rb:227:in `stat_tree'
/usr/local/bundle/gems/sprockets-3.7.0/lib/sprockets/legacy.rb:105:in `each'
/usr/local/bundle/gems/sprockets-3.7.0/lib/sprockets/legacy.rb:105:in `block in logical_paths'
/usr/local/bundle/gems/sprockets-3.7.0/lib/sprockets/legacy.rb:104:in `each'
/usr/local/bundle/gems/sprockets-3.7.0/lib/sprockets/legacy.rb:104:in `logical_paths'
/usr/local/bundle/gems/sprockets-3.7.0/lib/sprockets/manifest.rb:140:in `find'
/usr/local/bundle/gems/sprockets-3.7.0/lib/sprockets/manifest.rb:185:in `compile'
/usr/local/bundle/gems/sprockets-rails-3.2.0/lib/sprockets/rails/task.rb:68:in `block (3 levels) in define'
/usr/local/bundle/gems/sprockets-3.7.0/lib/rake/sprocketstask.rb:147:in `with_logger'
/usr/local/bundle/gems/sprockets-rails-3.2.0/lib/sprockets/rails/task.rb:67:in `block (2 levels) in define'
/usr/local/bundle/gems/rake-11.3.0/lib/rake/task.rb:248:in `call'
/usr/local/bundle/gems/rake-11.3.0/lib/rake/task.rb:248:in `block in execute'
/usr/local/bundle/gems/rake-11.3.0/lib/rake/task.rb:243:in `each'
/usr/local/bundle/gems/rake-11.3.0/lib/rake/task.rb:243:in `execute'
/usr/local/bundle/gems/rake-11.3.0/lib/rake/task.rb:187:in `block in invoke_with_call_chain'
/usr/local/lib/ruby/2.2.0/monitor.rb:211:in `mon_synchronize'
/usr/local/bundle/gems/rake-11.3.0/lib/rake/task.rb:180:in `invoke_with_call_chain'
/usr/local/bundle/gems/rake-11.3.0/lib/rake/task.rb:173:in `invoke'
/usr/local/bundle/gems/rake-11.3.0/lib/rake/application.rb:152:in `invoke_task'
/usr/local/bundle/gems/rake-11.3.0/lib/rake/application.rb:108:in `block (2 levels) in top_level'
/usr/local/bundle/gems/rake-11.3.0/lib/rake/application.rb:108:in `each'
/usr/local/bundle/gems/rake-11.3.0/lib/rake/application.rb:108:in `block in top_level'
/usr/local/bundle/gems/rake-11.3.0/lib/rake/application.rb:117:in `run_with_threads'
/usr/local/bundle/gems/rake-11.3.0/lib/rake/application.rb:102:in `top_level'
/usr/local/bundle/gems/rake-11.3.0/lib/rake/application.rb:80:in `block in run'
/usr/local/bundle/gems/rake-11.3.0/lib/rake/application.rb:178:in `standard_exception_handling'
/usr/local/bundle/gems/rake-11.3.0/lib/rake/application.rb:77:in `run'
/usr/local/bundle/gems/rake-11.3.0/exe/rake:27:in `<top (required)>'
/usr/local/bundle/bin/rake:17:in `load'
/usr/local/bundle/bin/rake:17:in `<main>'
Tasks: TOP => assets:precompile