質問編集履歴

2

logの追記

2019/06/17 23:26

投稿

tat_23
tat_23

スコア18

test CHANGED
File without changes
test CHANGED
@@ -147,3 +147,219 @@
147
147
 
148
148
 
149
149
  開発環境でログインし、ルートURL(homeページ)にリダイレクトされ、「Account not activated. Check your email for the activation link.」というflashがで表示された後にログを確認すると上記のようになっていました。
150
+
151
+
152
+
153
+ **[追記その2]**
154
+
155
+ ---
156
+
157
+ サーバーログに記載されているURLをブラウザで開いた時には、development.log、rails serverのログ共に何も変化はありませんでした。
158
+
159
+
160
+
161
+ 念の為、新規登録をもう一度してみて、URLにアクセスしましたが変わらぬ状況です。
162
+
163
+
164
+
165
+ 何かの参考になるかもしれないと思い、新規登録した時のdevelopment.logのコードを記載しておきます。
166
+
167
+ ```
168
+
169
+ Started GET "/signup" for 111.239.252.121 at 2019-06-17 23:16:43 +0000
170
+
171
+ Cannot render console from 111.239.252.121! Allowed networks: 127.0.0.1, ::1, 127.0.0.0/127.255.255.255
172
+
173
+ Processing by UsersController#new as HTML
174
+
175
+ Rendering users/new.html.erb within layouts/application
176
+
177
+ Rendered shared/_error_messages.html.erb (0.3ms)
178
+
179
+ Rendered users/_form.html.erb (4.0ms)
180
+
181
+ Rendered users/new.html.erb within layouts/application (5.1ms)
182
+
183
+ Rendered layouts/_rails_default.html.erb (39.3ms)
184
+
185
+ Rendered layouts/_shim.html.erb (0.3ms)
186
+
187
+ Rendered layouts/_header.html.erb (0.8ms)
188
+
189
+ Rendered layouts/_footer.html.erb (0.3ms)
190
+
191
+ Completed 200 OK in 52ms (Views: 51.1ms | ActiveRecord: 0.0ms)
192
+
193
+
194
+
195
+
196
+
197
+ Started POST "/signup" for 111.239.252.121 at 2019-06-17 23:17:10 +0000
198
+
199
+ Cannot render console from 111.239.252.121! Allowed networks: 127.0.0.1, ::1, 127.0.0.0/127.255.255.255
200
+
201
+ Processing by UsersController#create as HTML
202
+
203
+ Parameters: {"utf8"=>"✓", "authenticity_token"=>"Ui4NHnclAFbMM9EdiKrrWeZ6Ebn1WEBPEusxWQlGL2yHUi8tk2nkahA7vYbJi0lLZvq0kK/pZYOQPIF+ln67KA==", "user"=>{"name"=>"sample2", "email"=>"example2@gmail.com", "password"=>"[FILTERED]", "password_confirmation"=>"[FILTERED]"}, "commit"=>"Create my account"}
204
+
205
+  (0.1ms) begin transaction
206
+
207
+ User Exists (0.5ms) SELECT 1 AS one FROM "users" WHERE LOWER("users"."email") = LOWER(?) LIMIT ? [["email", "example2@gmail.com"], ["LIMIT", 1]]
208
+
209
+ SQL (0.7ms) INSERT INTO "users" ("name", "email", "created_at", "updated_at", "password_digest", "activation_digest") VALUES (?, ?, ?, ?, ?, ?) [["name", "sample2"], ["email", "example2@gmail.com"], ["created_at", "2019-06-17 23:17:10.753884"], ["updated_at", "2019-06-17 23:17:10.753884"], ["password_digest", "$2a$10$.WYZSyY75O2j//ieEZ8CjuwN.v2xKdwQrltHAmxojUdb4iCJD1eUu"], ["activation_digest", "$2a$10$1IXQ/CCixTFZ/QK0OEEmNu1F3JXXfddeiGH4E06/MgukPbmDzA8oe"]]
210
+
211
+  (4.9ms) commit transaction
212
+
213
+ Rendering user_mailer/account_activation.html.erb within layouts/mailer
214
+
215
+ Rendered user_mailer/account_activation.html.erb within layouts/mailer (1.3ms)
216
+
217
+ Rendering user_mailer/account_activation.text.erb within layouts/mailer
218
+
219
+ Rendered user_mailer/account_activation.text.erb within layouts/mailer (0.4ms)
220
+
221
+ UserMailer#account_activation: processed outbound mail in 10.8ms
222
+
223
+ Sent mail to example2@gmail.com (6.4ms)
224
+
225
+ Date: Mon, 17 Jun 2019 23:17:10 +0000
226
+
227
+ From: noreply@example.com
228
+
229
+ To: example2@gmail.com
230
+
231
+ Message-ID: <5d081f76bd526_11aa1d7070c759ee@ip-172-31-18-133.mail>
232
+
233
+ Subject: Account activation
234
+
235
+ Mime-Version: 1.0
236
+
237
+ Content-Type: multipart/alternative;
238
+
239
+ boundary="--==_mimepart_5d081f76bc424_11aa1d7070c758b";
240
+
241
+ charset=UTF-8
242
+
243
+ Content-Transfer-Encoding: 7bit
244
+
245
+
246
+
247
+
248
+
249
+ ----==_mimepart_5d081f76bc424_11aa1d7070c758b
250
+
251
+ Content-Type: text/plain;
252
+
253
+ charset=UTF-8
254
+
255
+ Content-Transfer-Encoding: 7bit
256
+
257
+
258
+
259
+
260
+
261
+ Hi sample2,
262
+
263
+
264
+
265
+ Welcome to the Sample App! Click on the link below to activate your account:
266
+
267
+
268
+
269
+ https://rails-tutorial-mhartl.c9users.io/account_activations/mjY7hPlzD0ZcfXduSwULnQ/edit?email=example2%40gmail.com
270
+
271
+
272
+
273
+
274
+
275
+ ----==_mimepart_5d081f76bc424_11aa1d7070c758b
276
+
277
+ Content-Type: text/html;
278
+
279
+ charset=UTF-8
280
+
281
+ Content-Transfer-Encoding: 7bit
282
+
283
+
284
+
285
+ <!DOCTYPE html>
286
+
287
+ <html>
288
+
289
+ <head>
290
+
291
+ <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
292
+
293
+ <style>
294
+
295
+ /* Email styles need to be inline */
296
+
297
+ </style>
298
+
299
+ </head>
300
+
301
+
302
+
303
+ <body>
304
+
305
+ <h1>Sample App</h1>
306
+
307
+
308
+
309
+ <p>Hi sample2,</p>
310
+
311
+
312
+
313
+ <p>
314
+
315
+ Welcome to the Sample App! Click on the link below to activate your account:
316
+
317
+ </p>
318
+
319
+
320
+
321
+ <a href="https://rails-tutorial-mhartl.c9users.io/account_activations/mjY7hPlzD0ZcfXduSwULnQ/edit?email=example2%40gmail.com">Activate</a>
322
+
323
+ </body>
324
+
325
+ </html>
326
+
327
+
328
+
329
+ ----==_mimepart_5d081f76bc424_11aa1d7070c758b--
330
+
331
+
332
+
333
+ Redirected to https://484a4fcb05bd454f9ea79bc02baa843f.vfs.cloud9.ap-southeast-1.amazonaws.com/
334
+
335
+ Completed 302 Found in 184ms (ActiveRecord: 6.2ms)
336
+
337
+
338
+
339
+
340
+
341
+ Started GET "/" for 111.239.252.121 at 2019-06-17 23:17:11 +0000
342
+
343
+ Cannot render console from 111.239.252.121! Allowed networks: 127.0.0.1, ::1, 127.0.0.0/127.255.255.255
344
+
345
+ Processing by StaticPagesController#home as HTML
346
+
347
+ Rendering static_pages/home.html.erb within layouts/application
348
+
349
+ Rendered static_pages/home.html.erb within layouts/application (1.8ms)
350
+
351
+ Rendered layouts/_rails_default.html.erb (43.6ms)
352
+
353
+ Rendered layouts/_shim.html.erb (0.3ms)
354
+
355
+ Rendered layouts/_header.html.erb (0.7ms)
356
+
357
+ Rendered layouts/_footer.html.erb (0.5ms)
358
+
359
+ Completed 200 OK in 54ms (Views: 52.7ms | ActiveRecord: 0.0ms)
360
+
361
+
362
+
363
+ ```
364
+
365
+ 上記の「**https://rails-tutorial-mhartl.c9users.io/account_activations/mjY7hPlzD0ZcfXduSwULnQ/edit?email=example2%40gmail.com**」の部分にアクセスしたものの、ログには何の変化も無かったということです。

1

development.logの追記

2019/06/17 23:26

投稿

tat_23
tat_23

スコア18

test CHANGED
File without changes
test CHANGED
@@ -93,3 +93,57 @@
93
93
  ・macOS
94
94
 
95
95
  ・cloud9で開発中
96
+
97
+
98
+
99
+ **[追記]**
100
+
101
+ ---------------------------
102
+
103
+ development.logを参照してみたら良いとの回答を頂いただきましたので、追記させて頂きます。
104
+
105
+ ```
106
+
107
+ Started POST "/login" for 111.239.252.121 at 2019-06-17 21:45:27 +0000
108
+
109
+ Cannot render console from 111.239.252.121! Allowed networks: 127.0.0.1, ::1, 127.0.0.0/127.255.255.255
110
+
111
+ Processing by SessionsController#create as HTML
112
+
113
+ Parameters: {"utf8"=>"✓", "authenticity_token"=>"YCiyrxxFcIDA8HYn6Ofxuv5Xd0rna2q+ExewUagyXa+JOEfmp7EMDw4GM6o9+9Dut6WdLVBqt1/0IVFgsTfDCw==", "session"=>{"email"=>"example@gmail.com", "password"=>"[FILTERED]", "remember_me"=>"1"}, "commit"=>"Log in"}
114
+
115
+ User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."email" = ? LIMIT ? [["email", "example@gmail.com"], ["LIMIT", 1]]
116
+
117
+ Redirected to https://484a4fcb05bd454f9ea79bc02baa843f.vfs.cloud9.ap-southeast-1.amazonaws.com/
118
+
119
+ Completed 302 Found in 80ms (ActiveRecord: 0.1ms)
120
+
121
+
122
+
123
+
124
+
125
+ Started GET "/" for 111.239.252.121 at 2019-06-17 21:45:28 +0000
126
+
127
+ Cannot render console from 111.239.252.121! Allowed networks: 127.0.0.1, ::1, 127.0.0.0/127.255.255.255
128
+
129
+ Processing by StaticPagesController#home as HTML
130
+
131
+ Rendering static_pages/home.html.erb within layouts/application
132
+
133
+ Rendered static_pages/home.html.erb within layouts/application (1.3ms)
134
+
135
+ Rendered layouts/_rails_default.html.erb (22.0ms)
136
+
137
+ Rendered layouts/_shim.html.erb (0.2ms)
138
+
139
+ Rendered layouts/_header.html.erb (0.6ms)
140
+
141
+ Rendered layouts/_footer.html.erb (0.4ms)
142
+
143
+ Completed 200 OK in 47ms (Views: 46.1ms | ActiveRecord: 0.0ms)
144
+
145
+ ```
146
+
147
+
148
+
149
+ 開発環境でログインし、ルートURL(homeページ)にリダイレクトされ、「Account not activated. Check your email for the activation link.」というflashがで表示された後にログを確認すると上記のようになっていました。