预编译资产失败。 (Heroku的)

时间:2017-04-27 21:27:17

标签: ruby-on-rails windows heroku

我是heroku的新用户,当我尝试Precompiling assets failed时出现git push heroku master错误

完整日志:

remote:        rake aborted!
remote:        Sass::SyntaxError: Invalid CSS after "...align: center; ": expected "}", was "!important;"
remote:        (sass):185
remote:        /tmp/build_14c15729d9e53d4d276c819017a42047/vendor/bundle/ruby/2.3.0/gems/sass-3.4.23/lib/sass/scss/parser.rb:1207:in `expected'
remote:        /tmp/build_14c15729d9e53d4d276c819017a42047/vendor/bundle/ruby/2.3.0/gems/sass-3.4.23/lib/sass/scss/parser.rb:1137:in `expected'
remote:        /tmp/build_14c15729d9e53d4d276c819017a42047/vendor/bundle/ruby/2.3.0/gems/sass-3.4.23/lib/sass/scss/parser.rb:1132:in `tok!'
remote:        /tmp/build_14c15729d9e53d4d276c819017a42047/vendor/bundle/ruby/2.3.0/gems/sass-3.4.23/lib/sass/scss/parser.rb:667:in `block'
remote:        /tmp/build_14c15729d9e53d4d276c819017a42047/vendor/bundle/ruby/2.3.0/gems/sass-3.4.23/lib/sass/scss/parser.rb:735:in `declaration_or_ruleset'
remote:        /tmp/build_14c15729d9e53d4d276c819017a42047/vendor/bundle/ruby/2.3.0/gems/sass-3.4.23/lib/sass/scss/parser.rb:685:in `block_child'
remote:        /tmp/build_14c15729d9e53d4d276c819017a42047/vendor/bundle/ruby/2.3.0/gems/sass-3.4.23/lib/sass/scss/parser.rb:674:in `block_contents'
remote:        /tmp/build_14c15729d9e53d4d276c819017a42047/vendor/bundle/ruby/2.3.0/gems/sass-3.4.23/lib/sass/scss/parser.rb:666:in `block'
remote:        /tmp/build_14c15729d9e53d4d276c819017a42047/vendor/bundle/ruby/2.3.0/gems/sass-3.4.23/lib/sass/scss/parser.rb:409:in `media_directive'
remote:        /tmp/build_14c15729d9e53d4d276c819017a42047/vendor/bundle/ruby/2.3.0/gems/sass-3.4.23/lib/sass/scss/parser.rb:222:in `special_directive'
remote:        /tmp/build_14c15729d9e53d4d276c819017a42047/vendor/bundle/ruby/2.3.0/gems/sass-3.4.23/lib/sass/scss/parser.rb:197:in `directive'
remote:        /tmp/build_14c15729d9e53d4d276c819017a42047/vendor/bundle/ruby/2.3.0/gems/sass-3.4.23/lib/sass/scss/parser.rb:684:in `block_child'
remote:        /tmp/build_14c15729d9e53d4d276c819017a42047/vendor/bundle/ruby/2.3.0/gems/sass-3.4.23/lib/sass/scss/parser.rb:677:in `block_contents'
remote:        /tmp/build_14c15729d9e53d4d276c819017a42047/vendor/bundle/ruby/2.3.0/gems/sass-3.4.23/lib/sass/scss/parser.rb:125:in `stylesheet'
remote:        /tmp/build_14c15729d9e53d4d276c819017a42047/vendor/bundle/ruby/2.3.0/gems/sass-3.4.23/lib/sass/scss/parser.rb:41:in `parse'
remote:        /tmp/build_14c15729d9e53d4d276c819017a42047/vendor/bundle/ruby/2.3.0/gems/sass-3.4.23/lib/sass/engine.rb:406:in `_to_tree'
remote:        /tmp/build_14c15729d9e53d4d276c819017a42047/vendor/bundle/ruby/2.3.0/gems/sass-3.4.23/lib/sass/engine.rb:281:in `render'
remote:        /tmp/build_14c15729d9e53d4d276c819017a42047/vendor/bundle/ruby/2.3.0/gems/sprockets-3.7.1/lib/sprockets/sass_compressor.rb:48:in `call'
remote:        /tmp/build_14c15729d9e53d4d276c819017a42047/vendor/bundle/ruby/2.3.0/gems/sprockets-3.7.1/lib/sprockets/sass_compressor.rb:28:in `call'
remote:        /tmp/build_14c15729d9e53d4d276c819017a42047/vendor/bundle/ruby/2.3.0/gems/sprockets-3.7.1/lib/sprockets/processor_utils.rb:75:in `call_processor'
remote:        /tmp/build_14c15729d9e53d4d276c819017a42047/vendor/bundle/ruby/2.3.0/gems/sprockets-3.7.1/lib/sprockets/processor_utils.rb:57:in `block in call_processors'
remote:        /tmp/build_14c15729d9e53d4d276c819017a42047/vendor/bundle/ruby/2.3.0/gems/sprockets-3.7.1/lib/sprockets/processor_utils.rb:56:in `reverse_each'
remote:        /tmp/build_14c15729d9e53d4d276c819017a42047/vendor/bundle/ruby/2.3.0/gems/sprockets-3.7.1/lib/sprockets/processor_utils.rb:56:in `call_processors'
remote:        /tmp/build_14c15729d9e53d4d276c819017a42047/vendor/bundle/ruby/2.3.0/gems/sprockets-3.7.1/lib/sprockets/loader.rb:134:in `load_from_unloaded'
remote:        /tmp/build_14c15729d9e53d4d276c819017a42047/vendor/bundle/ruby/2.3.0/gems/sprockets-3.7.1/lib/sprockets/loader.rb:60:in `block in load'
remote:        /tmp/build_14c15729d9e53d4d276c819017a42047/vendor/bundle/ruby/2.3.0/gems/sprockets-3.7.1/lib/sprockets/loader.rb:317:in `fetch_asset_from_dependency_cache'
remote:        /tmp/build_14c15729d9e53d4d276c819017a42047/vendor/bundle/ruby/2.3.0/gems/sprockets-3.7.1/lib/sprockets/loader.rb:44:in `load'
remote:        /tmp/build_14c15729d9e53d4d276c819017a42047/vendor/bundle/ruby/2.3.0/gems/sprockets-3.7.1/lib/sprockets/cached_environment.rb:20:in `block in initialize'
remote:        /tmp/build_14c15729d9e53d4d276c819017a42047/vendor/bundle/ruby/2.3.0/gems/sprockets-3.7.1/lib/sprockets/cached_environment.rb:47:in `load'
remote:        /tmp/build_14c15729d9e53d4d276c819017a42047/vendor/bundle/ruby/2.3.0/gems/sprockets-3.7.1/lib/sprockets/base.rb:66:in `find_asset'
remote:        /tmp/build_14c15729d9e53d4d276c819017a42047/vendor/bundle/ruby/2.3.0/gems/sprockets-3.7.1/lib/sprockets/base.rb:73:in `find_all_linked_assets'
remote:        /tmp/build_14c15729d9e53d4d276c819017a42047/vendor/bundle/ruby/2.3.0/gems/sprockets-3.7.1/lib/sprockets/manifest.rb:142:in `block in find'
remote:        /tmp/build_14c15729d9e53d4d276c819017a42047/vendor/bundle/ruby/2.3.0/gems/sprockets-3.7.1/lib/sprockets/legacy.rb:114:in `block (2 levels) in logical_paths'
remote:        /tmp/build_14c15729d9e53d4d276c819017a42047/vendor/bundle/ruby/2.3.0/gems/sprockets-3.7.1/lib/sprockets/path_utils.rb:228:in `block in stat_tree'
remote:        /tmp/build_14c15729d9e53d4d276c819017a42047/vendor/bundle/ruby/2.3.0/gems/sprockets-3.7.1/lib/sprockets/path_utils.rb:212:in `block in stat_directory'
remote:        /tmp/build_14c15729d9e53d4d276c819017a42047/vendor/bundle/ruby/2.3.0/gems/sprockets-3.7.1/lib/sprockets/path_utils.rb:209:in `each'
remote:        /tmp/build_14c15729d9e53d4d276c819017a42047/vendor/bundle/ruby/2.3.0/gems/sprockets-3.7.1/lib/sprockets/path_utils.rb:209:in `stat_directory'
remote:        /tmp/build_14c15729d9e53d4d276c819017a42047/vendor/bundle/ruby/2.3.0/gems/sprockets-3.7.1/lib/sprockets/path_utils.rb:227:in `stat_tree'
remote:        /tmp/build_14c15729d9e53d4d276c819017a42047/vendor/bundle/ruby/2.3.0/gems/sprockets-3.7.1/lib/sprockets/legacy.rb:105:in `each'
remote:        /tmp/build_14c15729d9e53d4d276c819017a42047/vendor/bundle/ruby/2.3.0/gems/sprockets-3.7.1/lib/sprockets/legacy.rb:105:in `block in logical_paths'
remote:        /tmp/build_14c15729d9e53d4d276c819017a42047/vendor/bundle/ruby/2.3.0/gems/sprockets-3.7.1/lib/sprockets/legacy.rb:104:in `each'
remote:        /tmp/build_14c15729d9e53d4d276c819017a42047/vendor/bundle/ruby/2.3.0/gems/sprockets-3.7.1/lib/sprockets/legacy.rb:104:in `logical_paths'
remote:        /tmp/build_14c15729d9e53d4d276c819017a42047/vendor/bundle/ruby/2.3.0/gems/sprockets-3.7.1/lib/sprockets/manifest.rb:140:in `find'
remote:        /tmp/build_14c15729d9e53d4d276c819017a42047/vendor/bundle/ruby/2.3.0/gems/sprockets-3.7.1/lib/sprockets/manifest.rb:185:in `compile'
remote:        /tmp/build_14c15729d9e53d4d276c819017a42047/vendor/bundle/ruby/2.3.0/gems/sprockets-rails-3.2.0/lib/sprockets/rails/task.rb:68:in `block (3 levels) in define'
remote:        /tmp/build_14c15729d9e53d4d276c819017a42047/vendor/bundle/ruby/2.3.0/gems/sprockets-3.7.1/lib/rake/sprocketstask.rb:147:in `with_logger'
remote:        /tmp/build_14c15729d9e53d4d276c819017a42047/vendor/bundle/ruby/2.3.0/gems/sprockets-rails-3.2.0/lib/sprockets/rails/task.rb:67:in `block (2 levels) in define'
remote:        /tmp/build_14c15729d9e53d4d276c819017a42047/vendor/bundle/ruby/2.3.0/gems/rake-12.0.0/exe/rake:27:in `<top (required)>'
remote:        Tasks: TOP => assets:precompile
remote:        (See full trace by running task with --trace)
remote:  !
remote:  !     Precompiling assets failed.
remote:  !
remote:  !     Push rejected, failed to compile Ruby app.
remote:
remote:  !     Push failed
remote: Verifying deploy...
remote:
remote: !       Couldn't find that app.
remote:
To https://git.heroku.com/morning-stream-92404.git
 ! [remote rejected] master -> master (pre-receive hook declined)
error: failed to push some refs to 'https://git.heroku.com/morning-stream-92404.git'

1 个答案:

答案 0 :(得分:1)

我在本地预编译,它可以解决问题。

rails assets:precompile