LoginSignup
6

More than 5 years have passed since last update.

CentOSでPostgresの環境でRailsアプリを動かす時に出会ったエラー

Posted at

Ident authentication failed for user

FATAL: Ident authentication failed for user

テストのサーバなので許しまくった…いいのか?

# "local" is for Unix domain socket connections only
local   all         all                               trust
# IPv4 local connections:
host    all         all         127.0.0.1/32          trust
# IPv6 local connections:
host    all         all         ::1/128               trust #ここぽい

エンコーディングのエラー

PG::InvalidParameterValue: ERROR:  new encoding (UTF8) is incompatible with the encoding of the template database (SQL_ASCII)
HINT:  Use the same encoding as in the template database, or use template0 as template.

下記のようにエンコーディング指定する

CREATE DATABASE "test_development" encoding 'UTF-8' TEMPLATE template0;

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
6