预编译资产失败 [英] Precompiling assets failed
本文介绍了预编译资产失败的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我正在推送一个我几个月没有更新的应用程序,并且遇到了这个问题。我只改变了我的代码中的一些变量。不知道为什么它突然对我做这件事。
I am pushing to an app I haven't updated in months and am running into this problem. I only changed a few variables in my code. No idea why its suddenly doing this to me.
!
! Precompiling assets failed.
!
! Push rejected, failed to compile Ruby app
To git@heroku.com:myapp.git
! [remote rejected] master -> master (pre-receive hook declined)
error: failed to push some refs to 'git@heroku.com:myapp.git'
rake aborted!
could not connect to server: Connection refused
Is the server running on host "127.0.0.1" and accepting
TCP/IP connections on port 5432?
/tmp/build_8c6e6263-c5c9-44ac-88ad-7eadb7c4c0e6/vendor/bundle/ruby/2.0.0/gems/activerecord-3.2.13/lib/active_record/connection_adapters/postgresql_adapter.rb:1216:in `initialize'
/tmp/build_8c6e6263-c5c9-44ac-88ad-7eadb7c4c0e6/vendor/bundle/ruby/2.0.0/gems/activerecord-3.2.13/lib/active_record/connection_adapters/postgresql_adapter.rb:1216:in `new'
/tmp/build_8c6e6263-c5c9-44ac-88ad-7eadb7c4c0e6/vendor/bundle/ruby/2.0.0/gems/activerecord-3.2.13/lib/active_record/connection_adapters/postgresql_adapter.rb:1216:in `connect'
/tmp/build_8c6e6263-c5c9-44ac-88ad-7eadb7c4c0e6/vendor/bundle/ruby/2.0.0/gems/activerecord-3.2.13/lib/active_record/connection_adapters/postgresql_adapter.rb:324:in `initialize'
/tmp/build_8c6e6263-c5c9-44ac-88ad-7eadb7c4c0e6/vendor/bundle/ruby/2.0.0/gems/activerecord-3.2.13/lib/active_record/connection_adapters/postgresql_adapter.rb:28:in `new'
/tmp/build_8c6e6263-c5c9-44ac-88ad-7eadb7c4c0e6/vendor/bundle/ruby/2.0.0/gems/activerecord-3.2.13/lib/active_record/connection_adapters/postgresql_adapter.rb:28:in `postgresql_connection'
/tmp/build_8c6e6263-c5c9-44ac-88ad-7eadb7c4c0e6/vendor/bundle/ruby/2.0.0/gems/activerecord-3.2.13/lib/active_record/connection_adapters/abstract/connection_pool.rb:315:in `new_connection'
/tmp/build_8c6e6263-c5c9-44ac-88ad-7eadb7c4c0e6/vendor/bundle/ruby/2.0.0/gems/activerecord-3.2.13/lib/active_record/connection_adapters/abstract/connection_pool.rb:325:in `checkout_new_connection'
/tmp/build_8c6e6263-c5c9-44ac-88ad-7eadb7c4c0e6/vendor/bundle/ruby/2.0.0/gems/activerecord-3.2.13/lib/active_record/connection_adapters/abstract/connection_pool.rb:247:in `block (2 levels) in checkout'
/tmp/build_8c6e6263-c5c9-44ac-88ad-7eadb7c4c0e6/vendor/bundle/ruby/2.0.0/gems/activerecord-3.2.13/lib/active_record/connection_adapters/abstract/connection_pool.rb:242:in `loop'
/tmp/build_8c6e6263-c5c9-44ac-88ad-7eadb7c4c0e6/vendor/bundle/ruby/2.0.0/gems/activerecord-3.2.13/lib/active_record/connection_adapters/abstract/connection_pool.rb:242:in `block in checkout'
/tmp/build_8c6e6263-c5c9-44ac-88ad-7eadb7c4c0e6/vendor/bundle/ruby/2.0.0/gems/activerecord-3.2.13/lib/active_record/connection_adapters/abstract/connection_pool.rb:239:in `checkout'
/tmp/build_8c6e6263-c5c9-44ac-88ad-7eadb7c4c0e6/vendor/bundle/ruby/2.0.0/gems/activerecord-3.2.13/lib/active_record/connection_adapters/abstract/connection_pool.rb:102:in `block in connection'
/tmp/build_8c6e6263-c5c9-44ac-88ad-7eadb7c4c0e6/vendor/bundle/ruby/2.0.0/gems/activerecord-3.2.13/lib/active_record/connection_adapters/abstract/connection_pool.rb:101:in `connection'
/tmp/build_8c6e6263-c5c9-44ac-88ad-7eadb7c4c0e6/vendor/bundle/ruby/2.0.0/gems/activerecord-3.2.13/lib/active_record/connection_adapters/abstract/connection_pool.rb:410:in `retrieve_connection'
/tmp/build_8c6e6263-c5c9-44ac-88ad-7eadb7c4c0e6/vendor/bundle/ruby/2.0.0/gems/activerecord-3.2.13/lib/active_record/connection_adapters/abstract/connection_specification.rb:171:in `retrieve_connection'
/tmp/build_8c6e6263-c5c9-44ac-88ad-7eadb7c4c0e6/vendor/bundle/ruby/2.0.0/gems/activerecord-3.2.13/lib/active_record/connection_adapters/abstract/connection_specification.rb:145:in `connection'
/tmp/build_8c6e6263-c5c9-44ac-88ad-7eadb7c4c0e6/vendor/bundle/ruby/2.0.0/gems/activerecord-3.2.13/lib/active_record/model_schema.rb:308:in `clear_cache!'
/tmp/build_8c6e6263-c5c9-44ac-88ad-7eadb7c4c0e6/vendor/bundle/ruby/2.0.0/gems/activerecord-3.2.13/lib/active_record/railtie.rb:104:in `block (2 levels) in <class:Railtie>'
推荐答案
解决方案
devcenter.heroku.com/articles/rails-asset-pipeline#assets-precompile-failuresrel =nofollow> here 。
Based on the mention of Postgres in the error message, I would try changing the following line in your config/application.rb to false like so: config.assets.initialize_on_precompile = false
.
这篇关于预编译资产失败的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文