Heroku无法编译资产

时间:2014-05-02 19:19:01

标签: ruby-on-rails heroku

我正在尝试在Heroku上编译资产,但是遇到了这个错误。我的资产是在本地编译的,但在Heroku上我无法做到。

Running: rake assets:precompile
       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_5h4sx2s7f96x/vendor/bundle/ruby/2.0.0/gems/activerecord-4.0.0.rc1/lib/active_record/connection_adapters/postgresql_adapter.rb:796:in `initialize'
       /tmp/build_5h4sx2s7f96x/vendor/bundle/ruby/2.0.0/gems/activerecord-4.0.0.rc1/lib/active_record/connection_adapters/postgresql_adapter.rb:796:in `new'
       /tmp/build_5h4sx2s7f96x/vendor/bundle/ruby/2.0.0/gems/activerecord-4.0.0.rc1/lib/active_record/connection_adapters/postgresql_adapter.rb:796:in `connect'
       /tmp/build_5h4sx2s7f96x/vendor/bundle/ruby/2.0.0/gems/activerecord-4.0.0.rc1/lib/active_record/connection_adapters/postgresql_adapter.rb:513:in `initialize'
       /tmp/build_5h4sx2s7f96x/vendor/bundle/ruby/2.0.0/gems/activerecord-4.0.0.rc1/lib/active_record/connection_adapters/postgresql_adapter.rb:41:in `new'
       /tmp/build_5h4sx2s7f96x/vendor/bundle/ruby/2.0.0/gems/activerecord-4.0.0.rc1/lib/active_record/connection_adapters/postgresql_adapter.rb:41:in `postgresql_connection'
       /tmp/build_5h4sx2s7f96x/vendor/bundle/ruby/2.0.0/gems/activerecord-4.0.0.rc1/lib/active_record/connection_adapters/abstract/connection_pool.rb:440:in `new_connection'
       /tmp/build_5h4sx2s7f96x/vendor/bundle/ruby/2.0.0/gems/activere

1 个答案:

答案 0 :(得分:0)

请确保您有

config.assets.initialize_on_precompile = false

配置文件