1. ms2sato

    Posted

    ms2sato
Changes in title
+CentOSでPostgresの環境でRailsアプリを動かす時に出会ったエラー
Changes in tags
Changes in body
Source | HTML | Preview
@@ -0,0 +1,31 @@
+
+## 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;
+```