質問編集履歴
2
書式の改善(ユーザー名→kinako1525)
test
CHANGED
File without changes
|
test
CHANGED
@@ -14,19 +14,19 @@
|
|
14
14
|
|
15
15
|
```
|
16
16
|
|
17
|
-
FATAL: [U"
|
17
|
+
FATAL: [U"kinako1525"~pX[hF‥s・
|
18
18
|
|
19
19
|
Couldn't create 'taskleaf_development' database. Please check your configuration.
|
20
20
|
|
21
21
|
rails aborted!
|
22
22
|
|
23
|
-
PG::ConnectionBad: FATAL: [U"
|
23
|
+
PG::ConnectionBad: FATAL: [U"kinako1525"~pX[hF‥s・
|
24
24
|
|
25
|
-
/home/
|
25
|
+
/home/kinako1525/taskleaf/bin/rails:9:in `<top (required)>'
|
26
26
|
|
27
|
-
/home/
|
27
|
+
/home/kinako1525/taskleaf/bin/spring:15:in `require'
|
28
28
|
|
29
|
-
/home/
|
29
|
+
/home/kinako1525/taskleaf/bin/spring:15:in `<top (required)>'
|
30
30
|
|
31
31
|
bin/rails:3:in `load'
|
32
32
|
|
@@ -64,7 +64,7 @@
|
|
64
64
|
|
65
65
|
エラーについて調べましたが、
|
66
66
|
|
67
|
-
FATAL: [U"
|
67
|
+
FATAL: [U"kinako1525"~pX[hF‥s・と同じ例が見つからず困っています...
|
68
68
|
|
69
69
|
### 補足情報(関連ファイル/ツールのバージョンなど)
|
70
70
|
|
@@ -94,9 +94,9 @@
|
|
94
94
|
|
95
95
|
>
|
96
96
|
|
97
|
-
> username:
|
97
|
+
> username: kinako1525
|
98
98
|
|
99
|
-
> password:
|
99
|
+
> password: ********
|
100
100
|
|
101
101
|
> host: localhost
|
102
102
|
|
1
補足情報にdatabase.ymlとpg_hba.confの追記
test
CHANGED
File without changes
|
test
CHANGED
@@ -56,9 +56,9 @@
|
|
56
56
|
|
57
57
|
・Postgresql上でのユーザー追加
|
58
58
|
|
59
|
-
・database.ymlの設定(
|
59
|
+
・database.ymlの設定(補足情報)
|
60
60
|
|
61
|
-
・/etc/postgresql/11/main/p
|
61
|
+
・/etc/postgresql/11/main/pg_hba.confのlocalをmd5に変更(補足情報)
|
62
62
|
|
63
63
|
・```bundle exec rails db:creaate```の実行
|
64
64
|
|
@@ -66,10 +66,102 @@
|
|
66
66
|
|
67
67
|
FATAL: [U"ユーザー名"~pX[hF‥s・と同じ例が見つからず困っています...
|
68
68
|
|
69
|
-
### 補足情報(
|
69
|
+
### 補足情報(関連ファイル/ツールのバージョンなど)
|
70
70
|
|
71
71
|
|
72
72
|
|
73
73
|
・Ubuntu 18.04LTS
|
74
74
|
|
75
75
|
・PostgreSQL11
|
76
|
+
|
77
|
+
|
78
|
+
|
79
|
+
・database.yml
|
80
|
+
|
81
|
+
> <前略>
|
82
|
+
|
83
|
+
> default: &default
|
84
|
+
|
85
|
+
> adapter: postgresql
|
86
|
+
|
87
|
+
> encoding: unicode
|
88
|
+
|
89
|
+
> # For details on connection pooling, see Rails configuration guide
|
90
|
+
|
91
|
+
> # http://guides.rubyonrails.org/configuring.html#database-pooling
|
92
|
+
|
93
|
+
> pool: <%= ENV.fetch("RAILS_MAX_THREADS") { 5 } %>
|
94
|
+
|
95
|
+
>
|
96
|
+
|
97
|
+
> username: ユーザー名
|
98
|
+
|
99
|
+
> password: パスワード
|
100
|
+
|
101
|
+
> host: localhost
|
102
|
+
|
103
|
+
> timeout: 5000
|
104
|
+
|
105
|
+
>
|
106
|
+
|
107
|
+
> development:
|
108
|
+
|
109
|
+
> <<: *default
|
110
|
+
|
111
|
+
> database: taskleaf_development
|
112
|
+
|
113
|
+
> <中略>
|
114
|
+
|
115
|
+
> test:
|
116
|
+
|
117
|
+
> <<: *default
|
118
|
+
|
119
|
+
> database: taskleaf_test
|
120
|
+
|
121
|
+
> <中略>
|
122
|
+
|
123
|
+
> production:
|
124
|
+
|
125
|
+
> <<: *default
|
126
|
+
|
127
|
+
> database: taskleaf_production
|
128
|
+
|
129
|
+
> username: taskleaf
|
130
|
+
|
131
|
+
> password: <%= ENV['TASKLEAF_DATABASE_PASSWORD'] %>
|
132
|
+
|
133
|
+
|
134
|
+
|
135
|
+
・pg_hba.conf
|
136
|
+
|
137
|
+
> <前略>
|
138
|
+
|
139
|
+
> local all postgres md5(peerからmd5に変更)
|
140
|
+
|
141
|
+
>
|
142
|
+
|
143
|
+
> # TYPE DATABASE USER ADDRESS METHOD
|
144
|
+
|
145
|
+
>
|
146
|
+
|
147
|
+
> # "local" is for Unix domain socket connections only
|
148
|
+
|
149
|
+
> local all all peer
|
150
|
+
|
151
|
+
> # IPv4 local connections:
|
152
|
+
|
153
|
+
> host all all 127.0.0.1/32 md5
|
154
|
+
|
155
|
+
> # IPv6 local connections:
|
156
|
+
|
157
|
+
> host all all ::1/128 md5
|
158
|
+
|
159
|
+
> # Allow replication connections from localhost, by a user with the
|
160
|
+
|
161
|
+
> # replication privilege.
|
162
|
+
|
163
|
+
> local replication all peer
|
164
|
+
|
165
|
+
> host replication all 127.0.0.1/32 md5
|
166
|
+
|
167
|
+
> host replication all ::1/128 md5
|