我尝试将我的应用部署到heroku但我收到此错误:
Invalid CSS after " height: 4em;": expected "}", was "<<<<<<< HEAD"
这种情况下HEAD
是个问题吗?
我在w3中验证了我的custom.css
文件,但没有任何更改。
完全跟踪错误:
-----> Preparing app for Rails asset pipeline
Running: rake assets:precompile
DEPRECATION WARNING: You have Rails 2.3-style plugins in vendor/plugins! Support for these plugins will be removed in Rails 4.0. Move them out and bundle them in your Gemfile, or fold them in to your app as lib/myplugin/* and config/initializers/myplugin.rb. See the release notes for more on this: http://weblog.rubyonrails.org/2012/1/4/rails-3-2-0-rc2-has-been-released. (called from <top (required)> at /tmp/build_cb755c6e-cfb5-4008-83be-23c2f4adbe3a/Rakefile:7)
DEPRECATION WARNING: You have Rails 2.3-style plugins in vendor/plugins! Support for these plugins will be removed in Rails 4.0. Move them out and bundle them in your Gemfile, or fold them in to your app as lib/myplugin/* and config/initializers/myplugin.rb. See the release notes for more on this: http://weblog.rubyonrails.org/2012/1/4/rails-3-2-0-rc2-has-been-released. (called from <top (required)> at /tmp/build_cb755c6e-cfb5-4008-83be-23c2f4adbe3a/Rakefile:7)
rake aborted!
Invalid CSS after " height: 4em;": expected "}", was "<<<<<<< HEAD"
(in /tmp/build_cb755c6e-cfb5-4008-83be-23c2f4adbe3a/app/assets/stylesheets/custom.css.orig)
(sass):1166
/tmp/build_cb755c6e-cfb5-4008-83be-23c2f4adbe3a/vendor/bundle/ruby/1.9.1/gems/sass-3.2.10/lib/sass/scss/parser.rb:1147:in `expected'
/tmp/build_cb755c6e-cfb5-4008-83be-23c2f4adbe3a/vendor/bundle/ruby/1.9.1/gems/sass-3.2.10/lib/sass/scss/parser.rb:1083:in `expected'
/tmp/build_cb755c6e-cfb5-4008-83be-23c2f4adbe3a/vendor/bundle/ruby/1.9.1/gems/sass-3.2.10/lib/sass/scss/parser.rb:1078:in `tok!'
/tmp/build_cb755c6e-cfb5-4008-83be-23c2f4adbe3a/vendor/bundle/ruby/1.9.1/gems/sass-3.2.10/lib/sass/scss/parser.rb:535:in `block'
/tmp/build_cb755c6e-cfb5-4008-83be-23c2f4adbe3a/vendor/bundle/ruby/1.9.1/gems/sass-3.2.10/lib/sass/scss/parser.rb:528:in `ruleset'
/tmp/build_cb755c6e-cfb5-4008-83be-23c2f4adbe3a/vendor/bundle/ruby/1.9.1/gems/sass-3.2.10/lib/sass/scss/parser.rb:552:in `block_child'
/tmp/build_cb755c6e-cfb5-4008-83be-23c2f4adbe3a/vendor/bundle/ruby/1.9.1/gems/sass-3.2.10/lib/sass/scss/parser.rb:545:in `block_contents'
/tmp/build_cb755c6e-cfb5-4008-83be-23c2f4adbe3a/vendor/bundle/ruby/1.9.1/gems/sass-3.2.10/lib/sass/scss/parser.rb:82:in `stylesheet'
/tmp/build_cb755c6e-cfb5-4008-83be-23c2f4adbe3a/vendor/bundle/ruby/1.9.1/gems/sass-3.2.10/lib/sass/scss/parser.rb:27:in `parse'
/tmp/build_cb755c6e-cfb5-4008-83be-23c2f4adbe3a/vendor/bundle/ruby/1.9.1/gems/sass-3.2.10/lib/sass/engine.rb:342:in `_to_tree'
/tmp/build_cb755c6e-cfb5-4008-83be-23c2f4adbe3a/vendor/bundle/ruby/1.9.1/gems/sass-3.2.10/lib/sass/engine.rb:315:in `_render'
/tmp/build_cb755c6e-cfb5-4008-83be-23c2f4adbe3a/vendor/bundle/ruby/1.9.1/gems/sass-3.2.10/lib/sass/engine.rb:262:in `render'
/tmp/build_cb755c6e-cfb5-4008-83be-23c2f4adbe3a/vendor/bundle/ruby/1.9.1/gems/sass-rails-3.2.6/lib/sass/rails/compressor.rb:12:in `compress'
/tmp/build_cb755c6e-cfb5-4008-83be-23c2f4adbe3a/vendor/bundle/ruby/1.9.1/gems/actionpack-3.2.13/lib/sprockets/compressors.rb:74:in `compress'
/tmp/build_cb755c6e-cfb5-4008-83be-23c2f4adbe3a/vendor/bundle/ruby/1.9.1/gems/sprockets-2.2.2/lib/sprockets/processing.rb:243:in `block in css_compressor='
/tmp/build_cb755c6e-cfb5-4008-83be-23c2f4adbe3a/vendor/bundle/ruby/1.9.1/gems/sprockets-2.2.2/lib/sprockets/processor.rb:29:in `call'
/tmp/build_cb755c6e-cfb5-4008-83be-23c2f4adbe3a/vendor/bundle/ruby/1.9.1/gems/sprockets-2.2.2/lib/sprockets/processor.rb:29:in `evaluate'
/tmp/build_cb755c6e-cfb5-4008-83be-23c2f4adbe3a/vendor/bundle/ruby/1.9.1/gems/tilt-1.4.1/lib/tilt/template.rb:103:in `render'
/tmp/build_cb755c6e-cfb5-4008-83be-23c2f4adbe3a/vendor/bundle/ruby/1.9.1/gems/sprockets-2.2.2/lib/sprockets/context.rb:193:in `block in evaluate'
/tmp/build_cb755c6e-cfb5-4008-83be-23c2f4adbe3a/vendor/bundle/ruby/1.9.1/gems/sprockets-2.2.2/lib/sprockets/context.rb:190:in `each'
/tmp/build_cb755c6e-cfb5-4008-83be-23c2f4adbe3a/vendor/bundle/ruby/1.9.1/gems/sprockets-2.2.2/lib/sprockets/context.rb:190:in `evaluate'
/tmp/build_cb755c6e-cfb5-4008-83be-23c2f4adbe3a/vendor/bundle/ruby/1.9.1/gems/sprockets-2.2.2/lib/sprockets/bundled_asset.rb:26:in `initialize'
/tmp/build_cb755c6e-cfb5-4008-83be-23c2f4adbe3a/vendor/bundle/ruby/1.9.1/gems/sprockets-2.2.2/lib/sprockets/base.rb:252:in `new'
/tmp/build_cb755c6e-cfb5-4008-83be-23c2f4adbe3a/vendor/bundle/ruby/1.9.1/gems/sprockets-2.2.2/lib/sprockets/base.rb:252:in `build_asset'
/tmp/build_cb755c6e-cfb5-4008-83be-23c2f4adbe3a/vendor/bundle/ruby/1.9.1/gems/sprockets-2.2.2/lib/sprockets/index.rb:93:in `block in build_asset'
/tmp/build_cb755c6e-cfb5-4008-83be-23c2f4adbe3a/vendor/bundle/ruby/1.9.1/gems/sprockets-2.2.2/lib/sprockets/caching.rb:19:in `cache_asset'
/tmp/build_cb755c6e-cfb5-4008-83be-23c2f4adbe3a/vendor/bundle/ruby/1.9.1/gems/sprockets-2.2.2/lib/sprockets/index.rb:92:in `build_asset'
/tmp/build_cb755c6e-cfb5-4008-83be-23c2f4adbe3a/vendor/bundle/ruby/1.9.1/gems/sprockets-2.2.2/lib/sprockets/base.rb:169:in `find_asset'
/tmp/build_cb755c6e-cfb5-4008-83be-23c2f4adbe3a/vendor/bundle/ruby/1.9.1/gems/sprockets-2.2.2/lib/sprockets/index.rb:60:in `find_asset'
/tmp/build_cb755c6e-cfb5-4008-83be-23c2f4adbe3a/vendor/bundle/ruby/1.9.1/gems/actionpack-3.2.13/lib/sprockets/static_compiler.rb:19:in `block in compile'
/tmp/build_cb755c6e-cfb5-4008-83be-23c2f4adbe3a/vendor/bundle/ruby/1.9.1/gems/sprockets-2.2.2/lib/sprockets/base.rb:219:in `block in each_logical_path'
/tmp/build_cb755c6e-cfb5-4008-83be-23c2f4adbe3a/vendor/bundle/ruby/1.9.1/gems/sprockets-2.2.2/lib/sprockets/base.rb:206:in `block (2 levels) in each_file'
/tmp/build_cb755c6e-cfb5-4008-83be-23c2f4adbe3a/vendor/bundle/ruby/1.9.1/gems/sprockets-2.2.2/lib/sprockets/base.rb:196:in `each'
/tmp/build_cb755c6e-cfb5-4008-83be-23c2f4adbe3a/vendor/bundle/ruby/1.9.1/gems/sprockets-2.2.2/lib/sprockets/base.rb:196:in `each_entry'
/tmp/build_cb755c6e-cfb5-4008-83be-23c2f4adbe3a/vendor/bundle/ruby/1.9.1/gems/sprockets-2.2.2/lib/sprockets/base.rb:204:in `block in each_file'
/tmp/build_cb755c6e-cfb5-4008-83be-23c2f4adbe3a/vendor/bundle/ruby/1.9.1/gems/sprockets-2.2.2/lib/sprockets/base.rb:203:in `each'
/tmp/build_cb755c6e-cfb5-4008-83be-23c2f4adbe3a/vendor/bundle/ruby/1.9.1/gems/sprockets-2.2.2/lib/sprockets/base.rb:203:in `each_file'
/tmp/build_cb755c6e-cfb5-4008-83be-23c2f4adbe3a/vendor/bundle/ruby/1.9.1/gems/sprockets-2.2.2/lib/sprockets/base.rb:217:in `each_logical_path'
/tmp/build_cb755c6e-cfb5-4008-83be-23c2f4adbe3a/vendor/bundle/ruby/1.9.1/gems/actionpack-3.2.13/lib/sprockets/static_compiler.rb:18:in `compile'
/tmp/build_cb755c6e-cfb5-4008-83be-23c2f4adbe3a/vendor/bundle/ruby/1.9.1/gems/actionpack-3.2.13/lib/sprockets/assets.rake:56:in `internal_precompile'
/tmp/build_cb755c6e-cfb5-4008-83be-23c2f4adbe3a/vendor/bundle/ruby/1.9.1/gems/actionpack-3.2.13/lib/sprockets/assets.rake:70:in `block (3 levels) in <top (required)>'
/tmp/build_cb755c6e-cfb5-4008-83be-23c2f4adbe3a/vendor/bundle/ruby/1.9.1/gems/actionpack-3.2.13/lib/sprockets/assets.rake:60:in `block (3 levels) in <top (required)>'
/tmp/build_cb755c6e-cfb5-4008-83be-23c2f4adbe3a/vendor/bundle/ruby/1.9.1/gems/actionpack-3.2.13/lib/sprockets/assets.rake:23:in `invoke_or_reboot_rake_task'
/tmp/build_cb755c6e-cfb5-4008-83be-23c2f4adbe3a/vendor/bundle/ruby/1.9.1/gems/actionpack-3.2.13/lib/sprockets/assets.rake:29:in `block (2 levels) in <top (required)>'
Tasks: TOP => assets:precompile:primary
(See full trace by running task with --trace)
!
! Precompiling assets failed.
!
! Push rejected, failed to compile Ruby app
答案 0 :(得分:3)
您的css文件中似乎存在git merge冲突。解决冲突,提交更改,然后再次尝试推送。 更新:注意到它是一个* .orig文件。 Git mergetool将使用标记保存文件的备份(例如&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt; HEAD等)并附加后缀'.orig'。您应该在提交之前删除这些内容,或者如果由于其他原因需要保留它们,则应将* .orig添加到.gitignore中。 See here了解有关处理mergetool备份的策略的更多信息。
答案 1 :(得分:0)
解析名为“custom.css.orig”的CSS文件时出错。 .orig后缀和错误消息的“&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt; HEAD”部分让我认为您错误地提交了合并冲突差异文件。您可能并不是故意提交该文件,如果删除它,则不应再出现此错误。