前提・実現したいこと
https://qiita.com/tomlla/items/9fa2feab1b9bd8749584
このような記事等見て、pg_hba.confのpeerの部分はmd5に変えたのですが、依然同様のエラーが出るので、
どうすればよいか分からずおります。
よろしくお願いします。他に必要な情報があれば追記要請していただけたらと思います。
発生している問題・エラーメッセージ
RAILS_ENV=production bin/rails db:createFATAL: ユーザ "taskleaf" で対向(peer)認証に失敗しました Couldn't create 'taskleaf_production' database. Please check your configuration. rails aborted! PG::ConnectionBad: FATAL: ユーザ "taskleaf" で対向(peer)認証に失敗しました /pathto/taskleaf/bin/rails:9:in `<top (required)>' /pathto/taskleaf/bin/spring:15:in `<top (required)>' bin/rails:3:in `load' bin/rails:3:in `<main>' Tasks: TOP => db:create (See full trace by running task with --trace)
該当のソースコード
pg_hba.conf
# Database administrative login by Unix domain socket local all postgres md5 # TYPE DATABASE USER ADDRESS METHOD # "local" is for Unix domain socket connections only local all all md5 # 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
試したこと
以上のconfをpeer⇒md5にした
補足情報(FW/ツールのバージョンなど)
database.yml
production: <<: *default database: taskleaf_production username: taskleaf password: <%= ENV['TASKLEAF_DATABASE_PASSWORD'] %>

回答1件
あなたの回答
tips
プレビュー
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。