Postgresql PG :: ConnectionBad

时间:2017-04-11 21:37:53

标签: postgresql pg

我在Windows上工作。我尝试使用PostgreSQL数据库。

我有这个错误

ERROR

PG::ConnectionBad
�����: ���� "Anton" �� ����������

Rails.root: C:/Users/Anton/RubymineProjects/untitled
Application Trace | Framework Trace | Full Trace

activerecord (4.2.5.1) lib/active_record/connection_adapters/postgresql_adapter.rb:651:in `initialize'
activerecord (4.2.5.1) lib/active_record/connection_adapters/postgresql_adapter.rb:651:in `new'
activerecord (4.2.5.1) lib/active_record/connection_adapters/postgresql_adapter.rb:651:in `connect'
activerecord (4.2.5.1) lib/active_record/connection_adapters/postgresql_adapter.rb:242:in `initialize'
activerecord (4.2.5.1) lib/active_record/connection_adapters/postgresql_adapter.rb:44:in `new'
activerecord (4.2.5.1) lib/active_record/connection_adapters/postgresql_adapter.rb:44:in `postgresql_connection'
activerecord (4.2.5.1) lib/active_record/connection_adapters/abstract/connection_pool.rb:438:in `new_connection'
activerecord (4.2.5.1) lib/active_record/connection_adapters/abstract/connection_pool.rb:448:in `checkout_new_connection'
activerecord (4.2.5.1) lib/active_record/connection_adapters/abstract/connection_pool.rb:422:in `acquire_connection'
activerecord (4.2.5.1) lib/active_record/connection_adapters/abstract/connection_pool.rb:349:in `block in checkout'
C:/RailsInstaller/Ruby2.2.0/lib/ruby/2.2.0/monitor.rb:211:in `mon_synchronize'
activerecord (4.2.5.1) lib/active_record/connection_adapters/abstract/connection_pool.rb:348:in `checkout'
activerecord (4.2.5.1) lib/active_record/connection_adapters/abstract/connection_pool.rb:263:in `block in connection'
C:/RailsInstaller/Ruby2.2.0/lib/ruby/2.2.0/monitor.rb:211:in `mon_synchronize'
activerecord (4.2.5.1) lib/active_record/connection_adapters/abstract/connection_pool.rb:262:in `connection'
activerecord (4.2.5.1) lib/active_record/connection_adapters/abstract/connection_pool.rb:571:in `retrieve_connection'
activerecord (4.2.5.1) lib/active_record/connection_handling.rb:113:in `retrieve_connection'
activerecord (4.2.5.1) lib/active_record/connection_handling.rb:87:in `connection'
activerecord (4.2.5.1) lib/active_record/migration.rb:383:in `connection'
activerecord (4.2.5.1) lib/active_record/migration.rb:370:in `call'
actionpack (4.2.5.1) lib/action_dispatch/middleware/callbacks.rb:29:in `block in call'
activesupport (4.2.5.1) lib/active_support/callbacks.rb:88:in `__run_callbacks__'
activesupport (4.2.5.1) lib/active_support/callbacks.rb:778:in `_run_call_callbacks'
activesupport (4.2.5.1) lib/active_support/callbacks.rb:81:in `run_callbacks'

由于错误页面中的符号,我无法通过搜索找到解决方案。 请帮我找到解决这个问题的正确方法

编辑:请从我的 pg_hba.conf 文件中找到数据

# TYPE  DATABASE        USER            ADDRESS                 METHOD

# IPv4 local connections:
host    all             all             127.0.0.1/32            trust
# IPv6 local connections:
host    all             all             ::1/128                 trust
# Allow replication connections from localhost, by a user with the
# replication privilege.
#host    replication     postgres        127.0.0.1/32            md5
#host    replication     postgres        ::1/128                 md5

0 个答案:

没有答案