简体   繁体   中英

Git Push Heroku Master error on rake assets:precompile

Trying to push changes to Heroku with: git push heroku master.

I got the following CircularDependencyError when it came to rake assets: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

I am new to Ruby and programming in general. Any help would be greatly appreciated.

Notes: It has no problems when pushing on Git Push Origin Master

Try running rake assets:precompile in your local application first. Then push the app to heroku once again.

See: rake assets:precompile RAILS_ENV=production not working as required

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM