rake资产上的Git Push Heroku Master错误:预编译

时间:2016-01-13 17:49:52

标签: ruby-on-rails ruby git heroku

尝试将更改推送到Heroku:git push heroku master。

当涉及到rake资产时,我得到了以下CircularDependencyError:precompile

-----> Preparing app for Rails asset pipeline
       Running: rake assets:precompile
       I, [2016-01-13T15:55:28.215959 #354]  INFO -- : Writing /tmp/build_0e4aaf291c7a69ab27b8f7714889c996/public/assets/application-b1c75457422e7764779b3a41c1807582.js
       rake aborted!
       Sprockets::CircularDependencyError: /tmp/build_0e4aaf291c7a69ab27b8f7714889c996/app/assets/stylesheets/application.css has already been required
       /tmp/build_0e4aaf291c7a69ab27b8f7714889c996/vendor/bundle/ruby/2.0.0/gems/sprockets-2.11.0/lib/sprockets/base.rb:392:in `circular_call_protection'
       /tmp/build_0e4aaf291c7a69ab27b8f7714889c996/vendor/bundle/ruby/2.0.0/gems/sprockets-2.11.0/lib/sprockets/base.rb:373:in `build_asset'
       /tmp/build_0e4aaf291c7a69ab27b8f7714889c996/vendor/bundle/ruby/2.0.0/gems/sprockets-2.11.0/lib/sprockets/index.rb:94:in `block in build_asset'
       /tmp/build_0e4aaf291c7a69ab27b8f7714889c996/vendor/bundle/ruby/2.0.0/gems/sprockets-2.11.0/lib/sprockets/caching.rb:58:in `cache_asset'
       /tmp/build_0e4aaf291c7a69ab27b8f7714889c996/vendor/bundle/ruby/2.0.0/gems/sprockets-2.11.0/lib/sprockets/index.rb:93:in `build_asset'
       /tmp/build_0e4aaf291c7a69ab27b8f7714889c996/vendor/bundle/ruby/2.0.0/gems/sprockets-2.11.0/lib/sprockets/base.rb:287:in `find_asset'
       /tmp/build_0e4aaf291c7a69ab27b8f7714889c996/vendor/bundle/ruby/2.0.0/gems/sprockets-2.11.0/lib/sprockets/index.rb:61:in `find_asset'
       /tmp/build_0e4aaf291c7a69ab27b8f7714889c996/vendor/bundle/ruby/2.0.0/gems/sprockets-2.11.0/lib/sprockets/processed_asset.rb:111:in `block in resolve_dependencies'
       /tmp/build_0e4aaf291c7a69ab27b8f7714889c996/vendor/bundle/ruby/2.0.0/gems/sprockets-2.11.0/lib/sprockets/processed_asset.rb:105:in `each'
       /tmp/build_0e4aaf291c7a69ab27b8f7714889c996/vendor/bundle/ruby/2.0.0/gems/sprockets-2.11.0/lib/sprockets/processed_asset.rb:105:in `resolve_dependencies'
       /tmp/build_0e4aaf291c7a69ab27b8f7714889c996/vendor/bundle/ruby/2.0.0/gems/sprockets-2.11.0/lib/sprockets/processed_asset.rb:97:in `build_required_assets'
       /tmp/build_0e4aaf291c7a69ab27b8f7714889c996/vendor/bundle/ruby/2.0.0/gems/sprockets-2.11.0/lib/sprockets/processed_asset.rb:16:in `initialize'
       /tmp/build_0e4aaf291c7a69ab27b8f7714889c996/vendor/bundle/ruby/2.0.0/gems/sprockets-2.11.0/lib/sprockets/base.rb:374:in `new'
       /tmp/build_0e4aaf291c7a69ab27b8f7714889c996/vendor/bundle/ruby/2.0.0/gems/sprockets-2.11.0/lib/sprockets/base.rb:374:in `block in build_asset'
       /tmp/build_0e4aaf291c7a69ab27b8f7714889c996/vendor/bundle/ruby/2.0.0/gems/sprockets-2.11.0/lib/sprockets/base.rb:395:in `circular_call_protection'
       /tmp/build_0e4aaf291c7a69ab27b8f7714889c996/vendor/bundle/ruby/2.0.0/gems/sprockets-2.11.0/lib/sprockets/base.rb:373:in `build_asset'
       /tmp/build_0e4aaf291c7a69ab27b8f7714889c996/vendor/bundle/ruby/2.0.0/gems/sprockets-2.11.0/lib/sprockets/index.rb:94:in `block in build_asset'
       /tmp/build_0e4aaf291c7a69ab27b8f7714889c996/vendor/bundle/ruby/2.0.0/gems/sprockets-2.11.0/lib/sprockets/caching.rb:58:in `cache_asset'
       /tmp/build_0e4aaf291c7a69ab27b8f7714889c996/vendor/bundle/ruby/2.0.0/gems/sprockets-2.11.0/lib/sprockets/index.rb:93:in `build_asset'
       /tmp/build_0e4aaf291c7a69ab27b8f7714889c996/vendor/bundle/ruby/2.0.0/gems/sprockets-2.11.0/lib/sprockets/base.rb:287:in `find_asset'
       /tmp/build_0e4aaf291c7a69ab27b8f7714889c996/vendor/bundle/ruby/2.0.0/gems/sprockets-2.11.0/lib/sprockets/index.rb:61:in `find_asset'
       /tmp/build_0e4aaf291c7a69ab27b8f7714889c996/vendor/bundle/ruby/2.0.0/gems/sprockets-2.11.0/lib/sprockets/processed_asset.rb:111:in `block in resolve_dependencies'
       /tmp/build_0e4aaf291c7a69ab27b8f7714889c996/vendor/bundle/ruby/2.0.0/gems/sprockets-2.11.0/lib/sprockets/processed_asset.rb:105:in `each'
       /tmp/build_0e4aaf291c7a69ab27b8f7714889c996/vendor/bundle/ruby/2.0.0/gems/sprockets-2.11.0/lib/sprockets/processed_asset.rb:105:in `resolve_dependencies'
       /tmp/build_0e4aaf291c7a69ab27b8f7714889c996/vendor/bundle/ruby/2.0.0/gems/sprockets-2.11.0/lib/sprockets/processed_asset.rb:97:in `build_required_assets'
       /tmp/build_0e4aaf291c7a69ab27b8f7714889c996/vendor/bundle/ruby/2.0.0/gems/sprockets-2.11.0/lib/sprockets/processed_asset.rb:16:in `initialize'
       /tmp/build_0e4aaf291c7a69ab27b8f7714889c996/vendor/bundle/ruby/2.0.0/gems/sprockets-2.11.0/lib/sprockets/base.rb:374:in `new'
       /tmp/build_0e4aaf291c7a69ab27b8f7714889c996/vendor/bundle/ruby/2.0.0/gems/sprockets-2.11.0/lib/sprockets/base.rb:374:in `block in build_asset'
       /tmp/build_0e4aaf291c7a69ab27b8f7714889c996/vendor/bundle/ruby/2.0.0/gems/sprockets-2.11.0/lib/sprockets/base.rb:395:in `circular_call_protection'
       /tmp/build_0e4aaf291c7a69ab27b8f7714889c996/vendor/bundle/ruby/2.0.0/gems/sprockets-2.11.0/lib/sprockets/base.rb:373:in `build_asset'
       /tmp/build_0e4aaf291c7a69ab27b8f7714889c996/vendor/bundle/ruby/2.0.0/gems/sprockets-2.11.0/lib/sprockets/index.rb:94:in `block in build_asset'
       /tmp/build_0e4aaf291c7a69ab27b8f7714889c996/vendor/bundle/ruby/2.0.0/gems/sprockets-2.11.0/lib/sprockets/caching.rb:58:in `cache_asset'
       /tmp/build_0e4aaf291c7a69ab27b8f7714889c996/vendor/bundle/ruby/2.0.0/gems/sprockets-2.11.0/lib/sprockets/index.rb:93:in `build_asset'
       /tmp/build_0e4aaf291c7a69ab27b8f7714889c996/vendor/bundle/ruby/2.0.0/gems/sprockets-2.11.0/lib/sprockets/base.rb:287:in `find_asset'
       /tmp/build_0e4aaf291c7a69ab27b8f7714889c996/vendor/bundle/ruby/2.0.0/gems/sprockets-2.11.0/lib/sprockets/index.rb:61:in `find_asset'
       /tmp/build_0e4aaf291c7a69ab27b8f7714889c996/vendor/bundle/ruby/2.0.0/gems/sprockets-2.11.0/lib/sprockets/bundled_asset.rb:37:in `init_with'
       /tmp/build_0e4aaf291c7a69ab27b8f7714889c996/vendor/bundle/ruby/2.0.0/gems/sprockets-2.11.0/lib/sprockets/asset.rb:24:in `from_hash'
       /tmp/build_0e4aaf291c7a69ab27b8f7714889c996/vendor/bundle/ruby/2.0.0/gems/sprockets-2.11.0/lib/sprockets/caching.rb:54:in `cache_asset'
       /tmp/build_0e4aaf291c7a69ab27b8f7714889c996/vendor/bundle/ruby/2.0.0/gems/sprockets-2.11.0/lib/sprockets/index.rb:93:in `build_asset'
       /tmp/build_0e4aaf291c7a69ab27b8f7714889c996/vendor/bundle/ruby/2.0.0/gems/sprockets-2.11.0/lib/sprockets/base.rb:287:in `find_asset'
       /tmp/build_0e4aaf291c7a69ab27b8f7714889c996/vendor/bundle/ruby/2.0.0/gems/sprockets-2.11.0/lib/sprockets/index.rb:61:in `find_asset'
       /tmp/build_0e4aaf291c7a69ab27b8f7714889c996/vendor/bundle/ruby/2.0.0/gems/sprockets-2.11.0/lib/sprockets/manifest.rb:211:in `block in find_asset'
       /tmp/build_0e4aaf291c7a69ab27b8f7714889c996/vendor/bundle/ruby/2.0.0/gems/sprockets-2.11.0/lib/sprockets/manifest.rb:257:in `benchmark'
       /tmp/build_0e4aaf291c7a69ab27b8f7714889c996/vendor/bundle/ruby/2.0.0/gems/sprockets-2.11.0/lib/sprockets/manifest.rb:210:in `find_asset'
       /tmp/build_0e4aaf291c7a69ab27b8f7714889c996/vendor/bundle/ruby/2.0.0/gems/sprockets-2.11.0/lib/sprockets/manifest.rb:119:in `block in compile'
       /tmp/build_0e4aaf291c7a69ab27b8f7714889c996/vendor/bundle/ruby/2.0.0/gems/sprockets-2.11.0/lib/sprockets/manifest.rb:118:in `each'
       /tmp/build_0e4aaf291c7a69ab27b8f7714889c996/vendor/bundle/ruby/2.0.0/gems/sprockets-2.11.0/lib/sprockets/manifest.rb:118:in `compile'
       /tmp/build_0e4aaf291c7a69ab27b8f7714889c996/vendor/bundle/ruby/2.0.0/gems/sprockets-rails-2.3.3/lib/sprockets/rails/task.rb:70:in `block (3 levels) in define'
       /tmp/build_0e4aaf291c7a69ab27b8f7714889c996/vendor/bundle/ruby/2.0.0/gems/sprockets-2.11.0/lib/rake/sprocketstask.rb:146:in `with_logger'
       /tmp/build_0e4aaf291c7a69ab27b8f7714889c996/vendor/bundle/ruby/2.0.0/gems/sprockets-rails-2.3.3/lib/sprockets/rails/task.rb:69:in `block (2 levels) in define'
       Tasks: TOP => assets:precompile
       (See full trace by running task with --trace)  !  !     Precompiling assets failed.  !  !     Push rejected, failed to compile Ruby app

我是Ruby新手和编程。任何帮助将不胜感激。

注意:推送Git Push Origin Master时没有问题

1 个答案:

答案 0 :(得分:0)

首先尝试在本地应用中运行rake assets:precompile。然后再次将应用程序推送到heroku。

请参阅:rake assets:precompile RAILS_ENV=production not working as required