質問編集履歴
1
内容を編集しました。
test
CHANGED
File without changes
|
test
CHANGED
@@ -14,36 +14,51 @@
|
|
14
14
|
特定のページに行くと下写真が表示されます。
|
15
15
|
![イメージ説明](https://ddjkaamml8q8x.cloudfront.net/questions/2024-04-04/37dd0f1b-cfb8-40a2-b348-756e5ebc97e7.png)
|
16
16
|
|
17
|
-
ログの内容
|
17
|
+
ログの内容更新しました
|
18
18
|
```
|
19
|
-
[ec2-user@ip-
|
19
|
+
[ec2-user@ip-172-31-12-75 inugo]$ sudo tail -f log/production.log
|
20
|
+
[cd036ade-25f6-4fd1-a83b-78f41a15569e]
|
21
|
+
I, [2024-04-04T13:29:47.676781 #8398] INFO -- : [b4a92c44-5c12-4a6e-bb88-03685c4236da] Started GET "/node/kor/113/main" for 87.246.7.86 at 2024-04-04 13:29:47 +0000
|
22
|
+
F, [2024-04-04T13:29:47.677283 #8398] FATAL -- : [b4a92c44-5c12-4a6e-bb88-03685c4236da]
|
23
|
+
[b4a92c44-5c12-4a6e-bb88-03685c4236da] ActionController::RoutingError (No route matches [GET] "/node/kor/113/main"):
|
24
|
+
[b4a92c44-5c12-4a6e-bb88-03685c4236da]
|
25
|
+
I, [2024-04-04T13:42:01.034595 #8398] INFO -- : [3d70abee-76af-4431-81f2-7876531099a8] Started GET "/" for 193.3.23.126 at 2024-04-04 13:42:01 +0000
|
26
|
+
I, [2024-04-04T13:42:01.035322 #8398] INFO -- : [3d70abee-76af-4431-81f2-7876531099a8] Processing by User::HomesController#top as HTML
|
27
|
+
I, [2024-04-04T13:42:01.035929 #8398] INFO -- : [3d70abee-76af-4431-81f2-7876531099a8] Rendered user/homes/top.html.erb within layouts/application (Duration: 0.0ms | Allocations: 4)
|
28
|
+
I, [2024-04-04T13:42:01.037546 #8398] INFO -- : [3d70abee-76af-4431-81f2-7876531099a8] Rendered layout layouts/application.html.erb (Duration: 1.7ms | Allocations: 908)
|
29
|
+
I, [2024-04-04T13:42:01.037733 #8398] INFO -- : [3d70abee-76af-4431-81f2-7876531099a8] Completed 200 OK in 2ms (Views: 2.0ms | Allocations: 1212)
|
30
|
+
I, [2024-04-04T13:51:24.250612 #8398] INFO -- : [a4507957-060f-4fdf-a356-013417cdbf7b] Started GET "/users/sign_in" for 14.11.8.34 at 2024-04-04 13:51:24 +0000
|
31
|
+
I, [2024-04-04T13:51:24.251385 #8398] INFO -- : [a4507957-060f-4fdf-a356-013417cdbf7b] Processing by User::SessionsController#new as HTML
|
32
|
+
I, [2024-04-04T13:51:24.253149 #8398] INFO -- : [a4507957-060f-4fdf-a356-013417cdbf7b] Rendered user/sessions/new.html.erb within layouts/application (Duration: 0.6ms | Allocations: 384)
|
33
|
+
I, [2024-04-04T13:51:24.254614 #8398] INFO -- : [a4507957-060f-4fdf-a356-013417cdbf7b] Rendered layout layouts/application.html.erb (Duration: 2.1ms | Allocations: 1240)
|
34
|
+
I, [2024-04-04T13:51:24.254791 #8398] INFO -- : [a4507957-060f-4fdf-a356-013417cdbf7b] Completed 200 OK in 3ms (Views: 2.5ms | Allocations: 1867)
|
20
|
-
I, [2024-04-04T1
|
35
|
+
I, [2024-04-04T13:51:25.756831 #8398] INFO -- : [2e81664e-e4ca-4161-91d5-6ebd2f0cbe52] Started GET "/shops/accommodation" for 14.11.8.34 at 2024-04-04 13:51:25 +0000
|
21
|
-
I, [2024-04-04T1
|
36
|
+
I, [2024-04-04T13:51:25.757571 #8398] INFO -- : [2e81664e-e4ca-4161-91d5-6ebd2f0cbe52] Processing by User::ShopsController#accommodation as HTML
|
22
|
-
I, [2024-04-04T1
|
37
|
+
I, [2024-04-04T13:51:25.765147 #8398] INFO -- : [2e81664e-e4ca-4161-91d5-6ebd2f0cbe52] Completed 500 Internal Server Error in 7ms (ActiveRecord: 1.0ms | Allocations: 1136)
|
23
|
-
F, [2024-04-04T1
|
38
|
+
F, [2024-04-04T13:51:25.765816 #8398] FATAL -- : [2e81664e-e4ca-4161-91d5-6ebd2f0cbe52]
|
24
|
-
[
|
39
|
+
[2e81664e-e4ca-4161-91d5-6ebd2f0cbe52] NoMethodError (undefined method `shops' for nil:NilClass
|
25
40
|
|
26
41
|
@shops = target_genre.shops
|
27
42
|
^^^^^^):
|
28
|
-
[
|
43
|
+
[2e81664e-e4ca-4161-91d5-6ebd2f0cbe52]
|
29
|
-
[
|
44
|
+
[2e81664e-e4ca-4161-91d5-6ebd2f0cbe52] app/controllers/user/shops_controller.rb:5:in `accommodation'
|
30
|
-
I, [2024-04-04T1
|
45
|
+
I, [2024-04-04T13:51:27.628818 #8398] INFO -- : [84cdd216-809e-43c6-86a9-4ebefc52e6c9] Started GET "/shops/shopping_mall" for 14.11.8.34 at 2024-04-04 13:51:27 +0000
|
31
|
-
|
46
|
+
I, [2024-04-04T13:51:27.629557 #8398] INFO -- : [84cdd216-809e-43c6-86a9-4ebefc52e6c9] Processing by User::ShopsController#shopping_mall as HTML
|
32
|
-
[cf206835-1d8c-40ca-acb5-aa272657960f] ActionController::RoutingError (No route matches [GET] "/.env"):
|
33
|
-
[cf206835-1d8c-40ca-acb5-aa272657960f]
|
34
|
-
I, [2024-04-04T1
|
47
|
+
I, [2024-04-04T13:51:27.632454 #8398] INFO -- : [84cdd216-809e-43c6-86a9-4ebefc52e6c9] Completed 500 Internal Server Error in 3ms (ActiveRecord: 0.6ms | Allocations: 1037)
|
35
|
-
F, [2024-04-04T1
|
48
|
+
F, [2024-04-04T13:51:27.633118 #8398] FATAL -- : [84cdd216-809e-43c6-86a9-4ebefc52e6c9]
|
36
|
-
[423b41eb-472c-4a4e-a26b-574b9a1e082c] ActionController::RoutingError (No route matches [POST] "/"):
|
37
|
-
[423b41eb-472c-4a4e-a26b-574b9a1e082c]
|
38
|
-
I, [2024-04-04T11:03:52.378342 #8398] INFO -- : [f4843e47-3668-42b4-9923-fac71aa83979] Started GET "/.env" for 185.254.196.186 at 2024-04-04 11:03:52 +0000
|
39
|
-
F, [2024-04-04T11:03:52.379013 #8398] FATAL -- : [f4843e47-3668-42b4-9923-fac71aa83979]
|
40
|
-
[
|
49
|
+
[84cdd216-809e-43c6-86a9-4ebefc52e6c9] NoMethodError (undefined method `shops' for nil:NilClass
|
50
|
+
|
41
|
-
|
51
|
+
@shops = target_genre.shops
|
42
|
-
I, [2024-04-04T11:03:53.076519 #8398] INFO -- : [f53f32f5-bf05-4170-b8b0-d125f2573f3d] Started POST "/" for 185.254.196.186 at 2024-04-04 11:03:53 +0000
|
43
|
-
|
52
|
+
^^^^^^):
|
44
|
-
[f53f32f5-bf05-4170-b8b0-d125f2573f3d] ActionController::RoutingError (No route matches [POST] "/"):
|
45
|
-
[
|
53
|
+
[84cdd216-809e-43c6-86a9-4ebefc52e6c9]
|
54
|
+
[84cdd216-809e-43c6-86a9-4ebefc52e6c9] app/controllers/user/shops_controller.rb:11:in `shopping_mall'
|
55
|
+
|
46
56
|
|
47
57
|
```
|
58
|
+
上記を見るに、
|
59
|
+
・ActionControllerルーティングエラーが/node/kor/113/mainにでている
|
60
|
+
・accommodationとshopping_mallのshops_controller.rbにあるshopsがnilだということ
|
61
|
+
が主な原因だと思うのですが、
|
62
|
+
ローカル(rails s)では問題なく表示されており、rails c でデータが入っているか確認しましたら、しっかり入っていました。
|
48
63
|
|
49
64
|
|