Domanda

I'm trying to compile assets on Heroku but getting this error. My assets are compiled on local but on Heroku I can't do it.

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
È stato utile?

Soluzione

Please make sure you have

config.assets.initialize_on_precompile = false

on configuration file

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top