ruby on rails - Error with Postgres Port when deploying to Herokuy -


i want deploy heroku have error:

precompiling assets failed.

note: i've put config.assets.initialize_on_precompile = false in application.rb it's still not working.

`preparing app rails asset pipeline    running: rake assets:precompile    rake aborted!    not connect server: connection refused    server running on host "127.0.0.1" , accepting    tcp/ip connections on port 5432?    /tmp/build_9ff1fa36-2743-4f79-a9ac-62679367458b/vendor/bundle/ruby/2.0.0/gems/activerecord-4.0.0/lib/active_record/connection_adapters/postgresql_adapter.rb:825:in `initialize'    /tmp/build_9ff1fa36-2743-4f79-a9ac-62679367458b/vendor/bundle/ruby/2.0.0/gems/activerecord-4.0.0/lib/active_record/connection_adapters/postgresql_adapter.rb:825:in `new'    /tmp/build_9ff1fa36-2743-4f79-a9ac-62679367458b/vendor/bundle/ruby/2.0.0/gems/activerecord-4.0.0/lib/active_record/connection_adapters/postgresql_adapter.rb:825:in `connect'    /tmp/build_9ff1fa36-2743-4f79-a9ac-62679367458b/vendor/bundle/ruby/2.0.0/gems/activerecord-4.0.0/lib/active_record/connection_adapters/postgresql_adapter.rb:542:in `initialize'    /tmp/build_9ff1fa36-2743-4f79-a9ac-62679367458b/vendor/bundle/ruby/2.0.0/gems/activerecord-4.0.0/lib/active_record/connection_adapters/postgresql_adapter.rb:41:in `new'    /tmp/build_9ff1fa36-2743-4f79-a9ac-62679367458b/vendor/bundle/ruby/2.0.0/gems/activerecord-4.0.0/lib/active_record/connection_adapters/postgresql_adapter.rb:41:in `postgresql_connection'    /tmp/build_9ff1fa36-2743-4f79-a9ac-62679367458b/vendor/bundle/ruby/2.0.0/gems/activerecord-4.0.0/lib/active_record/connection_adapters/abstract/connection_pool.rb:440:in `new_connection'    /tmp/build_9ff1fa36-2743-4f79-a9ac-62679367458b/vendor/bundle/ruby/2.0.0/gems/activerecord-4.0.0/lib/active_record/connection_adapters/abstract/connection_pool.rb:450:in `checkout_new_connection'    /tmp/build_9ff1fa36-2743-4f79-a9ac-62679367458b/vendor/bundle/ruby/2.0.0/gems/activerecord-4.0.0/lib/active_record/connection_adapters/abstract/connection_pool.rb:421:in `acquire_connection'    /tmp/build_9ff1fa36-2743-4f79-a9ac-62679367458b/vendor/bundle/ruby/2.0.0/gems/activerecord-4.0.0/lib/active_record/connection_adapters/abstract/connection_pool.rb:356:in `block in checkout'    /tmp/build_9ff1fa36-2743-4f79-a9ac-62679367458b/vendor/bundle/ruby/2.0.0/gems/activerecord-4.0.0/lib/active_record/connection_adapters/abstract/connection_pool.rb:355:in `checkout'    /tmp/build_9ff1fa36-2743-4f79-a9ac-62679367458b/vendor/bundle/ruby/2.0.0/gems/activerecord-4.0.0/lib/active_record/connection_adapters/abstract/connection_pool.rb:265:in `block in connection'    /tmp/build_9ff1fa36-2743-4f79-a9ac-62679367458b/vendor/bundle/ruby/2.0.0/gems/activerecord-4.0.0/lib/active_record/connection_adapters/abstract/connection_pool.rb:264:in `connection'    /tmp/build_9ff1fa36-2743-4f79-a9ac-62679367458b/vendor/bundle/ruby/2.0.0/gems/activerecord-4.0.0/lib/active_record/connection_adapters/abstract/connection_pool.rb:546:in `retrieve_connection'    /tmp/build_9ff1fa36-2743-4f79-a9ac-62679367458b/vendor/bundle/ruby/2.0.0/gems/activerecord-4.0.0/lib/active_record/connection_handling.rb:79:in `retrieve_connection'    /tmp/build_9ff1fa36-2743-4f79-a9ac-62679367458b/vendor/bundle/ruby/2.0.0/gems/activerecord-4.0.0/lib/active_record/connection_handling.rb:53:in `connection'    /tmp/build_9ff1fa36-2743-4f79-a9ac-62679367458b/vendor/bundle/ruby/2.0.0/gems/activerecord-4.0.0/lib/active_record/model_schema.rb:203:in `table_exists?'    /tmp/build_9ff1fa36-2743-4f79-a9ac-62679367458b/vendor/bundle/ruby/2.0.0/gems/rolify-3.4.0/lib/rolify/configure.rb:48:in `block in sanity_check'    /tmp/build_9ff1fa36-2743-4f79-a9ac-62679367458b/vendor/bundle/ruby/2.0.0/gems/rolify-3.4.0/lib/rolify/configure.rb:46:in `each'    /tmp/build_9ff1fa36-2743-4f79-a9ac-62679367458b/vendor/bundle/ruby/2.0.0/gems/rolify-3.4.0/lib/rolify/configure.rb:46:in `sanity_check'    /tmp/build_9ff1fa36-2743-4f79-a9ac-62679367458b/vendor/bundle/ruby/2.0.0/gems/rolify-3.4.0/lib/rolify/configure.rb:7:in `configure'    /tmp/build_9ff1fa36-2743-4f79-a9ac-62679367458b/config/initializers/rolify.rb:1:in `<top (required)>'    /tmp/build_9ff1fa36-2743-4f79-a9ac-62679367458b/vendor/bundle/ruby/2.0.0/gems/activesupport-4.0.0/lib/active_support/dependencies.rb:222:in `load'    /tmp/build_9ff1fa36-2743-4f79-a9ac-62679367458b/vendor/bundle/ruby/2.0.0/gems/activesupport-4.0.0/lib/active_support/dependencies.rb:222:in `block in load'    /tmp/build_9ff1fa36-2743-4f79-a9ac-62679367458b/vendor/bundle/ruby/2.0.0/gems/activesupport-4.0.0/lib/active_support/dependencies.rb:213:in `load_dependency'    /tmp/build_9ff1fa36-2743-4f79-a9ac-62679367458b/vendor/bundle/ruby/2.0.0/gems/activesupport-4.0.0/lib/active_support/dependencies.rb:222:in `load'    /tmp/build_9ff1fa36-2743-4f79-a9ac-62679367458b/vendor/bundle/ruby/2.0.0/gems/railties-4.0.0/lib/rails/engine.rb:609:in `block (2 levels) in <class:engine>'    /tmp/build_9ff1fa36-2743-4f79-a9ac-62679367458b/vendor/bundle/ruby/2.0.0/gems/railties-4.0.0/lib/rails/engine.rb:608:in `each'    /tmp/build_9ff1fa36-2743-4f79-a9ac-62679367458b/vendor/bundle/ruby/2.0.0/gems/railties-4.0.0/lib/rails/engine.rb:608:in `block in <class:engine>'    /tmp/build_9ff1fa36-2743-4f79-a9ac-62679367458b/vendor/bundle/ruby/2.0.0/gems/railties-4.0.0/lib/rails/initializable.rb:30:in `instance_exec'    /tmp/build_9ff1fa36-2743-4f79-a9ac-62679367458b/vendor/bundle/ruby/2.0.0/gems/railties-4.0.0/lib/rails/initializable.rb:30:in `run'    /tmp/build_9ff1fa36-2743-4f79-a9ac-62679367458b/vendor/bundle/ruby/2.0.0/gems/railties-4.0.0/lib/rails/initializable.rb:55:in `block in run_initializers'    /tmp/build_9ff1fa36-2743-4f79-a9ac-62679367458b/vendor/bundle/ruby/2.0.0/gems/railties-4.0.0/lib/rails/initializable.rb:44:in `each'    /tmp/build_9ff1fa36-2743-4f79-a9ac-62679367458b/vendor/bundle/ruby/2.0.0/gems/railties-4.0.0/lib/rails/initializable.rb:44:in `tsort_each_child'    /tmp/build_9ff1fa36-2743-4f79-a9ac-62679367458b/vendor/bundle/ruby/2.0.0/gems/railties-4.0.0/lib/rails/initializable.rb:54:in `run_initializers'    /tmp/build_9ff1fa36-2743-4f79-a9ac-62679367458b/vendor/bundle/ruby/2.0.0/gems/railties-4.0.0/lib/rails/application.rb:215:in `initialize!'    /tmp/build_9ff1fa36-2743-4f79-a9ac-62679367458b/vendor/bundle/ruby/2.0.0/gems/railties-4.0.0/lib/rails/railtie/configurable.rb:30:in `method_missing'    /tmp/build_9ff1fa36-2743-4f79-a9ac-62679367458b/config/environment.rb:5:in `<top (required)>'    /tmp/build_9ff1fa36-2743-4f79-a9ac-62679367458b/vendor/bundle/ruby/2.0.0/gems/activesupport-4.0.0/lib/active_support/dependencies.rb:228:in `require'    /tmp/build_9ff1fa36-2743-4f79-a9ac-62679367458b/vendor/bundle/ruby/2.0.0/gems/activesupport-4.0.0/lib/active_support/dependencies.rb:228:in `block in require'    /tmp/build_9ff1fa36-2743-4f79-a9ac-62679367458b/vendor/bundle/ruby/2.0.0/gems/activesupport-4.0.0/lib/active_support/dependencies.rb:213:in `load_dependency'    /tmp/build_9ff1fa36-2743-4f79-a9ac-62679367458b/vendor/bundle/ruby/2.0.0/gems/activesupport-4.0.0/lib/active_support/dependencies.rb:228:in `require'    /tmp/build_9ff1fa36-2743-4f79-a9ac-62679367458b/vendor/bundle/ruby/2.0.0/gems/railties-4.0.0/lib/rails/application.rb:189:in `require_environment!'    /tmp/build_9ff1fa36-2743-4f79-a9ac-62679367458b/vendor/bundle/ruby/2.0.0/gems/railties-4.0.0/lib/rails/application.rb:249:in `block in run_tasks_blocks'    /tmp/build_9ff1fa36-2743-4f79-a9ac-62679367458b/vendor/bundle/ruby/2.0.0/gems/sprockets-rails-2.0.1/lib/sprockets/rails/task.rb:54:in `block (2 levels) in define'    tasks: top => environment    (see full trace running task --trace) 

! ! precompiling assets failed. ! attempted access nonexistent database: ! https://devcenter.heroku.com/articles/pre-provision-database !

! push rejected, failed compile ruby app`

thanks!

once set code: config.assets.initialize_on_precompile = false

don't forget commit change before pushing heroku:

git commit -m

git push github remote repo

then git push heroku master

anytime make change file, need first commit , push remote repo before pushing heroku. otherwise, heroku won't pick change.

update:

heroku address same issue here. follow solution


Comments

Popular posts from this blog

how to proxy from https to http with lighttpd -

android - Automated my builds -

python - Flask migration error -