2

このrailscastチュートリアルに従おうとしています。ここで、rake db:create:all を使用してデータベースを作成しますが、次のエラー メッセージが表示されます。

FATAL:  password authentication failed for user aldila

ログインロールを右クリックし、パスワードを使用してユーザーaldilaを追加することにより、pgAdminを介してユーザーaldilaを作成しました。

だから、ここに私の database.yml があります:

development:
   adapter: postgresql
   host: localhost
   encoding: unicode
   database: my_app_development
   pool: 5
   username: aldila
   password: *mypass*

test:
   adapter: postgresql
   host: localhost
   encoding: unicode
   database: my_app_test
   pool: 5
   username: aldila
   password: *mypass*

production:
   adapter: postgresql
   host: localhost
   encoding: unicode
   database: my_app_production
   pool: 5
   username: aldila
   password: *mypass*

ここに私の pg_hba.conf があります

# TYPE  DATABASE        USER            ADDRESS                 METHOD

# IPv4 local connections:
host    all             all             127.0.0.1/32            md5
# IPv6 local connections:
host    all             all             ::1/128                 md5
# 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

コマンドで psql --version と入力すると、次のようになるため、PostreSQL のインストールに問題がある可能性があります。

'psql' is not recognized as an internal or external command,
operable program or batch file.

しかし、何が悪かったのかわかりません。ここからインストールし、サポートされているすべてのバージョンの EnterpriseDB からインストーラーをダウンロードします。

このような同様の質問が既にあることは知っていますが、this onethis oneに従っていますが、それでも同じエラーメッセージが表示されます。誰かが助けてくれれば、本当に感謝しています。ありがとう

4

1 に答える 1