Project

General

Profile

Heroku - Redmine 3.0

Added by isaac gonzalez almost 9 years ago

I got this error when I try to git push to Heroku.

remote: -----> Preparing app for Rails asset pipeline
remote: Running: rake assets:precompile
remote: rake aborted!
remote: PG::ConnectionBad: could not connect to server: Connection refused
remote: Is the server running on host "127.0.0.1" and accepting
remote: TCP/IP connections on port 5432?
remote: /tmp/build_8db4a55a64ab1ad965b05c62a8176c63/vendor/bundle/ruby/2.0.0/gems/activerecord-4.2.1/lib/active_record/connection_adapters/postgresql_adapter.rb:651:in `initialize'
remote: /tmp/build_8db4a55a64ab1ad965b05c62a8176c63/vendor/bundle/ruby/2.0.0/gems/activerecord-4.2.1/lib/active_record/connection_adapters/postgresql_adapter.rb:651:in `new'
remote: /tmp/build_8db4a55a64ab1ad965b05c62a8176c63/vendor/bundle/ruby/2.0.0/gems/activerecord-4.2.1/lib/active_record/connection_adapters/postgresql_adapter.rb:651:in `connect'
remote: /tmp/build_8db4a55a64ab1ad965b05c62a8176c63/vendor/bundle/ruby/2.0.0/gems/activerecord-4.2.1/lib/active_record/connection_adapters/postgresql_adapter.rb:242:in `initialize'
remote: /tmp/build_8db4a55a64ab1ad965b05c62a8176c63/vendor/bundle/ruby/2.0.0/gems/activerecord-4.2.1/lib/active_record/connection_adapters/postgresql_adapter.rb:44:in `new'
remote: /tmp/build_8db4a55a64ab1ad965b05c62a8176c63/vendor/bundle/ruby/2.0.0/gems/activerecord-4.2.1/lib/active_record/connection_adapters/postgresql_adapter.rb:44:in `postgresql_connection'
remote: /tmp/build_8db4a55a64ab1ad965b05c62a8176c63/vendor/bundle/ruby/2.0.0/gems/activerecord-4.2.1/lib/active_record/connection_adapters/abstract/connection_pool.rb:438:in `new_connection'
remote: /tmp/build_8db4a55a64ab1ad965b05c62a8176c63/vendor/bundle/ruby/2.0.0/gems/activerecord-4.2.1/lib/active_record/connection_adapters/abstract/connection_pool.rb:448:in `checkout_new_connection'
remote: /tmp/build_8db4a55a64ab1ad965b05c62a8176c63/vendor/bundle/ruby/2.0.0/gems/activerecord-4.2.1/lib/active_record/connection_adapters/abstract/connection_pool.rb:422:in `acquire_connection'
remote: /tmp/build_8db4a55a64ab1ad965b05c62a8176c63/vendor/bundle/ruby/2.0.0/gems/activerecord-4.2.1/lib/active_record/connection_adapters/abstract/connection_pool.rb:349:in `block in checkout'
remote: /tmp/build_8db4a55a64ab1ad965b05c62a8176c63/vendor/bundle/ruby/2.0.0/gems/activerecord-4.2.1/lib/active_record/connection_adapters/abstract/connection_pool.rb:348:in `checkout'
remote: /tmp/build_8db4a55a64ab1ad965b05c62a8176c63/vendor/bundle/ruby/2.0.0/gems/activerecord-4.2.1/lib/active_record/connection_adapters/abstract/connection_pool.rb:263:in `block in connection'
remote: /tmp/build_8db4a55a64ab1ad965b05c62a8176c63/vendor/bundle/ruby/2.0.0/gems/activerecord-4.2.1/lib/active_record/connection_adapters/abstract/connection_pool.rb:262:in `connection'
remote: /tmp/build_8db4a55a64ab1ad965b05c62a8176c63/vendor/bundle/ruby/2.0.0/gems/activerecord-4.2.1/lib/active_record/connection_adapters/abstract/connection_pool.rb:567:in `retrieve_connection'
remote: /tmp/build_8db4a55a64ab1ad965b05c62a8176c63/vendor/bundle/ruby/2.0.0/gems/activerecord-4.2.1/lib/active_record/connection_handling.rb:113:in `retrieve_connection'
remote: /tmp/build_8db4a55a64ab1ad965b05c62a8176c63/vendor/bundle/ruby/2.0.0/gems/activerecord-4.2.1/lib/active_record/connection_handling.rb:87:in `connection'
remote: /tmp/build_8db4a55a64ab1ad965b05c62a8176c63/vendor/bundle/ruby/2.0.0/gems/activerecord-4.2.1/lib/active_record/model_schema.rb:230:in `table_exists?'
remote: /tmp/build_8db4a55a64ab1ad965b05c62a8176c63/vendor/bundle/ruby/2.0.0/gems/activerecord-4.2.1/lib/active_record/attribute_methods/primary_key.rb:97:in `get_primary_key'
remote: /tmp/build_8db4a55a64ab1ad965b05c62a8176c63/vendor/bundle/ruby/2.0.0/gems/activerecord-4.2.1/lib/active_record/attribute_methods/primary_key.rb:85:in `reset_primary_key'
remote: /tmp/build_8db4a55a64ab1ad965b05c62a8176c63/vendor/bundle/ruby/2.0.0/gems/activerecord-4.2.1/lib/active_record/attribute_methods/primary_key.rb:73:in `primary_key'
remote: /tmp/build_8db4a55a64ab1ad965b05c62a8176c63/vendor/bundle/ruby/2.0.0/gems/protected_attributes-1.0.9/lib/active_record/mass_assignment_security/attribute_assignment.rb:15:in `attributes_protected_by_default'
remote: /tmp/build_8db4a55a64ab1ad965b05c62a8176c63/vendor/bundle/ruby/2.0.0/gems/protected_attributes-1.0.9/lib/active_model/mass_assignment_security.rb:332:in `block in protected_attributes_configs'
remote: /tmp/build_8db4a55a64ab1ad965b05c62a8176c63/vendor/bundle/ruby/2.0.0/gems/protected_attributes-1.0.9/lib/active_model/mass_assignment_security.rb:217:in `yield'
remote: /tmp/build_8db4a55a64ab1ad965b05c62a8176c63/vendor/bundle/ruby/2.0.0/gems/protected_attributes-1.0.9/lib/active_model/mass_assignment_security.rb:217:in `protected_attributes'
remote: /tmp/build_8db4a55a64ab1ad965b05c62a8176c63/vendor/bundle/ruby/2.0.0/gems/protected_attributes-1.0.9/lib/active_model/mass_assignment_security.rb:123:in `block in attr_protected'
remote: /tmp/build_8db4a55a64ab1ad965b05c62a8176c63/vendor/bundle/ruby/2.0.0/gems/protected_attributes-1.0.9/lib/active_model/mass_assignment_security.rb:122:in `each'
remote: /tmp/build_8db4a55a64ab1ad965b05c62a8176c63/vendor/bundle/ruby/2.0.0/gems/protected_attributes-1.0.9/lib/active_model/mass_assignment_security.rb:122:in `attr_protected'
remote: /tmp/build_8db4a55a64ab1ad965b05c62a8176c63/app/models/custom_field.rb:32:in `<class:CustomField>'
remote: /tmp/build_8db4a55a64ab1ad965b05c62a8176c63/app/models/custom_field.rb:18:in `<top (required)>'
remote: /tmp/build_8db4a55a64ab1ad965b05c62a8176c63/vendor/bundle/ruby/2.0.0/gems/activesupport-4.2.1/lib/active_support/dependencies.rb:274:in `require
remote: /tmp/build_8db4a55a64ab1ad965b05c62a8176c63/vendor/bundle/ruby/2.0.0/gems/activesupport-4.2.1/lib/active_support/dependencies.rb:274:in `block in require'
remote: /tmp/build_8db4a55a64ab1ad965b05c62a8176c63/vendor/bundle/ruby/2.0.0/gems/activesupport-4.2.1/lib/active_support/dependencies.rb:240:in `load_dependency'
remote: /tmp/build_8db4a55a64ab1ad965b05c62a8176c63/vendor/bundle/ruby/2.0.0/gems/activesupport-4.2.1/lib/active_support/dependencies.rb:274:in `require
remote: /tmp/build_8db4a55a64ab1ad965b05c62a8176c63/vendor/bundle/ruby/2.0.0/gems/activesupport-4.2.1/lib/active_support/dependencies.rb:360:in `require_or_load'
remote: /tmp/build_8db4a55a64ab1ad965b05c62a8176c63/vendor/bundle/ruby/2.0.0/gems/activesupport-4.2.1/lib/active_support/dependencies.rb:494:in `load_missing_constant'
remote: /tmp/build_8db4a55a64ab1ad965b05c62a8176c63/vendor/bundle/ruby/2.0.0/gems/activesupport-4.2.1/lib/active_support/dependencies.rb:184:in `const_missing'
remote: /tmp/build_8db4a55a64ab1ad965b05c62a8176c63/vendor/bundle/ruby/2.0.0/gems/activesupport-4.2.1/lib/active_support/dependencies.rb:526:in `load_missing_constant'
remote: /tmp/build_8db4a55a64ab1ad965b05c62a8176c63/vendor/bundle/ruby/2.0.0/gems/activesupport-4.2.1/lib/active_support/dependencies.rb:184:in `const_missing'
remote: /tmp/build_8db4a55a64ab1ad965b05c62a8176c63/vendor/bundle/ruby/2.0.0/gems/activesupport-4.2.1/lib/active_support/dependencies.rb:526:in `load_missing_constant'
remote: /tmp/build_8db4a55a64ab1ad965b05c62a8176c63/vendor/bundle/ruby/2.0.0/gems/activesupport-4.2.1/lib/active_support/dependencies.rb:184:in `const_missing'
remote: /tmp/build_8db4a55a64ab1ad965b05c62a8176c63/vendor/bundle/ruby/2.0.0/gems/activesupport-4.2.1/lib/active_support/dependencies.rb:526:in `load_missing_constant'
remote: /tmp/build_8db4a55a64ab1ad965b05c62a8176c63/vendor/bundle/ruby/2.0.0/gems/activesupport-4.2.1/lib/active_support/dependencies.rb:184:in `const_missing'
remote: /tmp/build_8db4a55a64ab1ad965b05c62a8176c63/lib/redmine/field_format.rb:83:in `field_attributes'
remote: /tmp/build_8db4a55a64ab1ad965b05c62a8176c63/lib/redmine/field_format.rb:86:in `<class:Base>'
remote: /tmp/build_8db4a55a64ab1ad965b05c62a8176c63/lib/redmine/field_format.rb:48:in `<module:FieldFormat>'
remote: /tmp/build_8db4a55a64ab1ad965b05c62a8176c63/lib/redmine/field_format.rb:19:in `<module:Redmine>'
remote: /tmp/build_8db4a55a64ab1ad965b05c62a8176c63/lib/redmine/field_format.rb:18:in `<top (required)>'
remote: /tmp/build_8db4a55a64ab1ad965b05c62a8176c63/vendor/bundle/ruby/2.0.0/gems/activesupport-4.2.1/lib/active_support/dependencies.rb:274:in `require
remote: /tmp/build_8db4a55a64ab1ad965b05c62a8176c63/vendor/bundle/ruby/2.0.0/gems/activesupport-4.2.1/lib/active_support/dependencies.rb:274:in `block in require'
remote: /tmp/build_8db4a55a64ab1ad965b05c62a8176c63/vendor/bundle/ruby/2.0.0/gems/activesupport-4.2.1/lib/active_support/dependencies.rb:240:in `load_dependency'
remote: /tmp/build_8db4a55a64ab1ad965b05c62a8176c63/vendor/bundle/ruby/2.0.0/gems/activesupport-4.2.1/lib/active_support/dependencies.rb:274:in `require
remote: /tmp/build_8db4a55a64ab1ad965b05c62a8176c63/lib/redmine.rb:38:in `<top (required)>'
remote: /tmp/build_8db4a55a64ab1ad965b05c62a8176c63/vendor/bundle/ruby/2.0.0/gems/activesupport-4.2.1/lib/active_support/dependencies.rb:274:in `require
remote: /tmp/build_8db4a55a64ab1ad965b05c62a8176c63/vendor/bundle/ruby/2.0.0/gems/activesupport-4.2.1/lib/active_support/dependencies.rb:274:in `block in require'
remote: /tmp/build_8db4a55a64ab1ad965b05c62a8176c63/vendor/bundle/ruby/2.0.0/gems/activesupport-4.2.1/lib/active_support/dependencies.rb:240:in `load_dependency'
remote: /tmp/build_8db4a55a64ab1ad965b05c62a8176c63/vendor/bundle/ruby/2.0.0/gems/activesupport-4.2.1/lib/active_support/dependencies.rb:274:in `require
remote: /tmp/build_8db4a55a64ab1ad965b05c62a8176c63/config/initializers/30-redmine.rb:6:in `<top (required)>'
remote: /tmp/build_8db4a55a64ab1ad965b05c62a8176c63/vendor/bundle/ruby/2.0.0/gems/activesupport-4.2.1/lib/active_support/dependencies.rb:268:in `load'
remote: /tmp/build_8db4a55a64ab1ad965b05c62a8176c63/vendor/bundle/ruby/2.0.0/gems/activesupport-4.2.1/lib/active_support/dependencies.rb:268:in `block in load'
remote: /tmp/build_8db4a55a64ab1ad965b05c62a8176c63/vendor/bundle/ruby/2.0.0/gems/activesupport-4.2.1/lib/active_support/dependencies.rb:240:in `load_dependency'
remote: /tmp/build_8db4a55a64ab1ad965b05c62a8176c63/vendor/bundle/ruby/2.0.0/gems/activesupport-4.2.1/lib/active_support/dependencies.rb:268:in `load'
remote: /tmp/build_8db4a55a64ab1ad965b05c62a8176c63/vendor/bundle/ruby/2.0.0/gems/railties-4.2.1/lib/rails/engine.rb:652:in `block in load_config_initializer'
remote: /tmp/build_8db4a55a64ab1ad965b05c62a8176c63/vendor/bundle/ruby/2.0.0/gems/activesupport-4.2.1/lib/active_support/notifications.rb:166:in `instrument'
remote: /tmp/build_8db4a55a64ab1ad965b05c62a8176c63/vendor/bundle/ruby/2.0.0/gems/railties-4.2.1/lib/rails/engine.rb:651:in `load_config_initializer'
remote: /tmp/build_8db4a55a64ab1ad965b05c62a8176c63/vendor/bundle/ruby/2.0.0/gems/railties-4.2.1/lib/rails/engine.rb:616:in `block (2 levels) in <class:Engine>'
remote: /tmp/build_8db4a55a64ab1ad965b05c62a8176c63/vendor/bundle/ruby/2.0.0/gems/railties-4.2.1/lib/rails/engine.rb:615:in `each'
remote: /tmp/build_8db4a55a64ab1ad965b05c62a8176c63/vendor/bundle/ruby/2.0.0/gems/railties-4.2.1/lib/rails/engine.rb:615:in `block in <class:Engine>'
remote: /tmp/build_8db4a55a64ab1ad965b05c62a8176c63/vendor/bundle/ruby/2.0.0/gems/railties-4.2.1/lib/rails/initializable.rb:30:in `instance_exec'
remote: /tmp/build_8db4a55a64ab1ad965b05c62a8176c63/vendor/bundle/ruby/2.0.0/gems/railties-4.2.1/lib/rails/initializable.rb:30:in `run'
remote: /tmp/build_8db4a55a64ab1ad965b05c62a8176c63/vendor/bundle/ruby/2.0.0/gems/railties-4.2.1/lib/rails/initializable.rb:55:in `block in run_initializers'
remote: /tmp/build_8db4a55a64ab1ad965b05c62a8176c63/vendor/bundle/ruby/2.0.0/gems/railties-4.2.1/lib/rails/initializable.rb:44:in `each'
remote: /tmp/build_8db4a55a64ab1ad965b05c62a8176c63/vendor/bundle/ruby/2.0.0/gems/railties-4.2.1/lib/rails/initializable.rb:44:in `tsort_each_child'
remote: /tmp/build_8db4a55a64ab1ad965b05c62a8176c63/vendor/bundle/ruby/2.0.0/gems/railties-4.2.1/lib/rails/initializable.rb:54:in `run_initializers'
remote: /tmp/build_8db4a55a64ab1ad965b05c62a8176c63/vendor/bundle/ruby/2.0.0/gems/railties-4.2.1/lib/rails/application.rb:352:in `initialize!'
remote: /tmp/build_8db4a55a64ab1ad965b05c62a8176c63/config/environment.rb:14:in `<top (required)>'
remote: /tmp/build_8db4a55a64ab1ad965b05c62a8176c63/vendor/bundle/ruby/2.0.0/gems/activesupport-4.2.1/lib/active_support/dependencies.rb:274:in `require
remote: /tmp/build_8db4a55a64ab1ad965b05c62a8176c63/vendor/bundle/ruby/2.0.0/gems/activesupport-4.2.1/lib/active_support/dependencies.rb:274:in `block in require'
remote: /tmp/build_8db4a55a64ab1ad965b05c62a8176c63/vendor/bundle/ruby/2.0.0/gems/activesupport-4.2.1/lib/active_support/dependencies.rb:240:in `load_dependency'
remote: /tmp/build_8db4a55a64ab1ad965b05c62a8176c63/vendor/bundle/ruby/2.0.0/gems/activesupport-4.2.1/lib/active_support/dependencies.rb:274:in `require
remote: /tmp/build_8db4a55a64ab1ad965b05c62a8176c63/vendor/bundle/ruby/2.0.0/gems/railties-4.2.1/lib/rails/application.rb:328:in `require_environment!'
remote: /tmp/build_8db4a55a64ab1ad965b05c62a8176c63/vendor/bundle/ruby/2.0.0/gems/railties-4.2.1/lib/rails/application.rb:457:in `block in run_tasks_blocks'
remote: /tmp/build_8db4a55a64ab1ad965b05c62a8176c63/vendor/bundle/ruby/2.0.0/gems/sprockets-rails-2.2.4/lib/sprockets/rails/task.rb:64:in `block (2 levels) in define'
remote: Tasks: TOP => environment
remote: (See full trace by running task with --trace)
remote: !
remote: ! Precompiling assets failed.
remote: ! Attempted to access a nonexistent database:
remote: ! https://devcenter.heroku.com/articles/pre-provision-database
remote: !
remote:
remote: ! Push rejected, failed to compile Ruby app
remote:
remote: Verifying deploy...
remote:
remote: ! Push rejected to rslixet.

What can I do?


Replies (7)

RE: Heroku - Redmine 3.0 - Added by Leonel Iturralde almost 9 years ago

remote: PG::ConnectionBad: could not connect to server: Connection refused
remote: Is the server running on host "127.0.0.1" and accepting
remote: TCP/IP connections on port 5432?

I think that lines says that there is no postgresql running.

RE: Heroku - Redmine 3.0 - Added by isaac gonzalez almost 9 years ago

How can I do that?

RE: Heroku - Redmine 3.0 - Added by isaac gonzalez almost 9 years ago

I started postgresql but still have the same error...
Air-de-Macbook:~ IDGM$ brew services restart postgresql
==> Successfully started `postgresql` (label: homebrew.mxcl.postgresql)

remote: Running: rake assets:precompile
remote: rake aborted!
remote: PG::ConnectionBad: could not connect to server: Connection refused
remote: Is the server running on host "127.0.0.1" and accepting
remote: TCP/IP connections on port 5432?

Am I doing something wrong?

even manually I got the same error...

Air-de-Macbook:~ IDGM$ pg_ctl -D /usr/local/var/postgres -l /usr/local/var/postgres/server.log start
pg_ctl: another server might be running; trying to start server anyway
server starting

remote: Running: rake assets:precompile
remote: rake aborted!
remote: PG::ConnectionBad: could not connect to server: Connection refused
remote: Is the server running on host "127.0.0.1" and accepting
remote: TCP/IP connections on port 5432?

RE: Heroku - Redmine 3.0 - Added by Leonel Iturralde almost 9 years ago

isaac gonzalez wrote:

How can I do that?

I have no experience in heroku deployment. But try reading this link https://devcenter.heroku.com/articles/pre-provision-database

I started postgresql but still have the same error...
Air-de-Macbook:~ IDGM$ brew services restart postgresql
==> Successfully started `postgresql` (label: homebrew.mxcl.postgresql)
...

Are you trying to run postgres locally before deploying?
Try checking postgres log in search for an error.

RE: Heroku - Redmine 3.0 - Added by isaac gonzalez almost 9 years ago

This is the log of postgres:

LOG: could not bind IPv6 socket: Address already in use
HINT: Is another postmaster already running on port 5432? If not, wait a few seconds and retry.
LOG: could not bind IPv4 socket: Address already in use
HINT: Is another postmaster already running on port 5432? If not, wait a few seconds and retry.
WARNING: could not create listen socket for "localhost"
FATAL: could not create any TCP/IP sockets

But, when I check if I have another service running -->

Error: Service `postgresql` not running, wanna start it? Try `brew services start postgresql`

Any idea?

RE: Heroku - Redmine 3.0 - Added by isaac gonzalez almost 9 years ago

IT'S WORKING! THANK YOU! I'm sorry I didn't read carefully about the previous link (devcenter heroku)

That was the solution. OMG I was doing a lot of searches in google, so thank you! I appreciated your help :·3

    (1-7/7)