質問編集履歴

8

ログ差し替え

2022/01/18 08:28

投稿

lunaluna
lunaluna

score4

test CHANGED
File without changes
test CHANGED
@@ -25,6 +25,7 @@
25
25
  F, [2022-01-18T08:00:11.713856 #4558] FATAL -- : [ea700483-a6b7-4916-b7cd-64444d18829b]
26
26
  F, [2022-01-18T08:00:11.713974 #4558] FATAL -- : [ea700483-a6b7-4916-b7cd-64444d18829b] ActiveRecord::StatementInvalid (Mysql2::Error: Incorrect string value: '\xE3\x83\x86\xE3\x82\xB9...' for column 'name' at row 1: INSERT INTO `users` (`email`, `encrypted_password`, `image_id`, `name`, `created_at`, `updated_at`) VALUES ('test@test', '$2a$12$CzUc8yGNmRcMcUiLPyl5iexraum3ydrmUVTr4KCBovVppHoj8NTTa', NULL, 'テストユーザー', '2022-01-18 08:00:11', '2022-01-18 08:00:11')):
27
27
  F, [2022-01-18T08:00:11.714088 #4558] FATAL -- : [ea700483-a6b7-4916-b7cd-64444d18829b]
28
+
28
29
  ```
29
30
 
30
31
  ローカル環境のログ
@@ -53,6 +54,8 @@
53
54
  Blog Load (0.1ms) SELECT "blogs".* FROM "blogs" WHERE "blogs"."user_id" = ? [["user_id", 10]]
54
55
  Rendered users/mypage.html.erb within layouts/application (11.9ms)
55
56
  Completed 200 OK in 126ms (Views: 98.0ms | ActiveRecord: 2.7ms)
57
+
58
+
56
59
  ```
57
60
 
58
61
  Userモデル

7

追記

2022/01/18 08:03

投稿

lunaluna
lunaluna

score4

test CHANGED
File without changes
test CHANGED
@@ -15,10 +15,45 @@
15
15
  原因、解決法のわかるからがいらっしゃいましたらご教示お願いいたします。
16
16
  またそのほかに原因じゃないかと思われる点などございましたらお教えいただけますとありがたいです。
17
17
  ### ログ
18
- ![イメージ説明](https://ddjkaamml8q8x.cloudfront.net/questions/2022-01-18/0f61d25f-e808-4d4e-971e-a9bf72020308.jpeg)
18
+ ```ここに言語を入力
19
+ I, [2022-01-18T08:00:11.405322 #4558] INFO -- : [ea700483-a6b7-4916-b7cd-64444d18829b] Parameters: {"utf8"=>"✓", "authenticity_token"=>"Y3dOxMiQMIeWdRCMs0dg8SBbptLqGN4L5fIXsNleyRDd9XLIZZSeyrEFQiUzDq6LQcPCFgLWf72DrB4YWxWwOg==", "user"=>{"image"=>"{}", "name"=>"テストユーザー", "email"=>"test@test", "password"=>"[FILTERED]", "password_confirmation"=>"[FILTERED]"}, "commit"=>"Sign up"}
20
+ D, [2022-01-18T08:00:11.707839 #4558] DEBUG -- : [ea700483-a6b7-4916-b7cd-64444d18829b] (0.8ms) BEGIN
21
+ D, [2022-01-18T08:00:11.709553 #4558] DEBUG -- : [ea700483-a6b7-4916-b7cd-64444d18829b] User Exists (1.0ms) SELECT 1 AS one FROM `users` WHERE `users`.`email` = BINARY 'test@test' LIMIT 1
22
+ D, [2022-01-18T08:00:11.711650 #4558] DEBUG -- : [ea700483-a6b7-4916-b7cd-64444d18829b] User Create (1.1ms) INSERT INTO `users` (`email`, `encrypted_password`, `image_id`, `name`, `created_at`, `updated_at`) VALUES ('test@test', '$2a$12$CzUc8yGNmRcMcUiLPyl5iexraum3ydrmUVTr4KCBovVppHoj8NTTa', NULL, 'テストユーザー', '2022-01-18 08:00:11', '2022-01-18 08:00:11')
23
+ D, [2022-01-18T08:00:11.712626 #4558] DEBUG -- : [ea700483-a6b7-4916-b7cd-64444d18829b] (0.8ms) ROLLBACK
24
+ I, [2022-01-18T08:00:11.712869 #4558] INFO -- : [ea700483-a6b7-4916-b7cd-64444d18829b] Completed 500 Internal Server Error in 307ms (ActiveRecord: 3.6ms)
25
+ F, [2022-01-18T08:00:11.713856 #4558] FATAL -- : [ea700483-a6b7-4916-b7cd-64444d18829b]
26
+ F, [2022-01-18T08:00:11.713974 #4558] FATAL -- : [ea700483-a6b7-4916-b7cd-64444d18829b] ActiveRecord::StatementInvalid (Mysql2::Error: Incorrect string value: '\xE3\x83\x86\xE3\x82\xB9...' for column 'name' at row 1: INSERT INTO `users` (`email`, `encrypted_password`, `image_id`, `name`, `created_at`, `updated_at`) VALUES ('test@test', '$2a$12$CzUc8yGNmRcMcUiLPyl5iexraum3ydrmUVTr4KCBovVppHoj8NTTa', NULL, 'テストユーザー', '2022-01-18 08:00:11', '2022-01-18 08:00:11')):
27
+ F, [2022-01-18T08:00:11.714088 #4558] FATAL -- : [ea700483-a6b7-4916-b7cd-64444d18829b]
28
+ ```
19
29
 
20
30
  ローカル環境のログ
21
- ![イメージ説明](https://ddjkaamml8q8x.cloudfront.net/questions/2022-01-18/9928bf85-c690-428b-95de-6ed39dba7a27.png)
31
+ ```ここに言語を入力
32
+ Started POST "/users" for 101.102.239.190 at 2022-01-18 08:02:34 +0000
33
+ Cannot render console from 101.102.239.190! Allowed networks: 127.0.0.1, ::1, 127.0.0.0/127.255.255.255
34
+ Processing by Users::RegistrationsController#create as HTML
35
+ Parameters: {"utf8"=>"✓", "authenticity_token"=>"XyNOyDUyHA6WcGJLwTO253l9BTqOiSF284DFGc9VdcXXDtyvKAjOWS5Z+iZmJ1J115BAwzy8IQp3yDxQtDcYag==", "user"=>{"image"=>"{}", "name"=>"テストユーザー", "email"=>"test@test2", "password"=>"[FILTERED]", "password_confirmation"=>"[FILTERED]"}, "commit"=>"Sign up"}
36
+ (0.1ms) begin transaction
37
+ User Exists (0.2ms) SELECT 1 AS one FROM "users" WHERE "users"."email" = ? LIMIT ? [["email", "test@test2"], ["LIMIT", 1]]
38
+ User Create (3.1ms) INSERT INTO "users" ("email", "encrypted_password", "image_id", "name", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["email", "test@test2"], ["encrypted_password", "$2a$12$6cTN0Ex4oZpjOaH3D5A.fO44fA.tlKk6fHmyg9xx4tXZUsym75yU."], ["image_id", nil], ["name", "テストユーザー"], ["created_at", "2022-01-18 08:02:35.150649"], ["updated_at", "2022-01-18 08:02:35.150649"]]
39
+ (4.2ms) commit transaction
40
+ Redirected to https://0acdecb5a0134f75bf79907b17a0cc95.vfs.cloud9.us-east-1.amazonaws.com/mypage
41
+ Completed 302 Found in 325ms (ActiveRecord: 7.6ms)
42
+
43
+
44
+ Started GET "/mypage" for 101.102.239.190 at 2022-01-18 08:02:35 +0000
45
+ Cannot render console from 101.102.239.190! Allowed networks: 127.0.0.1, ::1, 127.0.0.0/127.255.255.255
46
+ Processing by UsersController#mypage as HTML
47
+ User Load (1.8ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? ORDER BY "users"."id" ASC LIMIT ? [["id", 10], ["LIMIT", 1]]
48
+ (0.1ms) SELECT SUM("balances"."amount") FROM "balances" WHERE "balances"."user_id" = ? AND "balances"."period" BETWEEN ? AND ? AND "balances"."balance" = ? AND "balances"."period" BETWEEN ? AND ? [["user_id", 10], ["period", "2022-01-01"], ["period", "2022-01-31"], ["balance", 0], ["period", "2022-01-01"], ["period", "2022-01-31"]]
49
+ (0.1ms) SELECT SUM("balances"."amount") FROM "balances" WHERE "balances"."user_id" = ? AND "balances"."period" BETWEEN ? AND ? AND "balances"."balance" = ? AND "balances"."period" BETWEEN ? AND ? [["user_id", 10], ["period", "2022-01-01"], ["period", "2022-01-31"], ["balance", 1], ["period", "2022-01-01"], ["period", "2022-01-31"]]
50
+ (0.1ms) SELECT SUM("balances"."amount") FROM "balances" WHERE "balances"."user_id" = ? AND "balances"."balance" = ? [["user_id", 10], ["balance", 0]]
51
+ (0.1ms) SELECT SUM("balances"."amount") FROM "balances" WHERE "balances"."user_id" = ? AND "balances"."balance" = ? [["user_id", 10], ["balance", 1]]
52
+ Rendering users/mypage.html.erb within layouts/application
53
+ Blog Load (0.1ms) SELECT "blogs".* FROM "blogs" WHERE "blogs"."user_id" = ? [["user_id", 10]]
54
+ Rendered users/mypage.html.erb within layouts/application (11.9ms)
55
+ Completed 200 OK in 126ms (Views: 98.0ms | ActiveRecord: 2.7ms)
56
+ ```
22
57
 
23
58
  Userモデル
24
59
  ![イメージ説明](https://ddjkaamml8q8x.cloudfront.net/questions/2022-01-18/e8438c2e-8088-4aaf-b1c9-1ffb5b9b1216.png)

6

画像の差し替え

2022/01/18 05:58

投稿

lunaluna
lunaluna

score4

test CHANGED
File without changes
test CHANGED
@@ -23,3 +23,7 @@
23
23
  Userモデル
24
24
  ![イメージ説明](https://ddjkaamml8q8x.cloudfront.net/questions/2022-01-18/e8438c2e-8088-4aaf-b1c9-1ffb5b9b1216.png)
25
25
 
26
+ ### 追記
27
+ ログを見返したところ「500 Internal Server Error」が起こっていることが原因だとわかりましたが、そのエラーの意味を調べ、問題箇所を探しましたが見つかりませんでした。
28
+ 解決方法がわかる方がいらっしゃいましたらご教示お願いいたします。
29
+

5

画像追加

2022/01/18 05:52

投稿

lunaluna
lunaluna

score4

test CHANGED
File without changes
test CHANGED
@@ -15,9 +15,7 @@
15
15
  原因、解決法のわかるからがいらっしゃいましたらご教示お願いいたします。
16
16
  またそのほかに原因じゃないかと思われる点などございましたらお教えいただけますとありがたいです。
17
17
  ### ログ
18
- ![イメージ説明](https://ddjkaamml8q8x.cloudfront.net/questions/2022-01-18/ec7be955-4957-4a9d-bc30-6cc30bceb356.png)
18
+ ![イメージ説明](https://ddjkaamml8q8x.cloudfront.net/questions/2022-01-18/0f61d25f-e808-4d4e-971e-a9bf72020308.jpeg)
19
- ![イメージ説明](https://ddjkaamml8q8x.cloudfront.net/questions/2022-01-18/d4c55cbb-fdae-48ae-be29-9701826bc1ca.png)
20
- ログを追加いたしました。
21
19
 
22
20
  ローカル環境のログ
23
21
  ![イメージ説明](https://ddjkaamml8q8x.cloudfront.net/questions/2022-01-18/9928bf85-c690-428b-95de-6ed39dba7a27.png)

4

画像の追加

2022/01/18 00:19

投稿

lunaluna
lunaluna

score4

test CHANGED
File without changes
test CHANGED
@@ -22,3 +22,6 @@
22
22
  ローカル環境のログ
23
23
  ![イメージ説明](https://ddjkaamml8q8x.cloudfront.net/questions/2022-01-18/9928bf85-c690-428b-95de-6ed39dba7a27.png)
24
24
 
25
+ Userモデル
26
+ ![イメージ説明](https://ddjkaamml8q8x.cloudfront.net/questions/2022-01-18/e8438c2e-8088-4aaf-b1c9-1ffb5b9b1216.png)
27
+

3

ログの画像の追加

2022/01/17 23:56

投稿

lunaluna
lunaluna

score4

test CHANGED
File without changes
test CHANGED
@@ -19,3 +19,6 @@
19
19
  ![イメージ説明](https://ddjkaamml8q8x.cloudfront.net/questions/2022-01-18/d4c55cbb-fdae-48ae-be29-9701826bc1ca.png)
20
20
  ログを追加いたしました。
21
21
 
22
+ ローカル環境のログ
23
+ ![イメージ説明](https://ddjkaamml8q8x.cloudfront.net/questions/2022-01-18/9928bf85-c690-428b-95de-6ed39dba7a27.png)
24
+

2

文字の修正

2022/01/17 23:39

投稿

lunaluna
lunaluna

score4

test CHANGED
File without changes
test CHANGED
@@ -14,4 +14,8 @@
14
14
  ```
15
15
  原因、解決法のわかるからがいらっしゃいましたらご教示お願いいたします。
16
16
  またそのほかに原因じゃないかと思われる点などございましたらお教えいただけますとありがたいです。
17
+ ### ログ
18
+ ![イメージ説明](https://ddjkaamml8q8x.cloudfront.net/questions/2022-01-18/ec7be955-4957-4a9d-bc30-6cc30bceb356.png)
19
+ ![イメージ説明](https://ddjkaamml8q8x.cloudfront.net/questions/2022-01-18/d4c55cbb-fdae-48ae-be29-9701826bc1ca.png)
20
+ ログを追加いたしました。
17
21
 

1

2022/01/17 19:07

投稿

lunaluna
lunaluna

score4

test CHANGED
File without changes
test CHANGED
@@ -13,4 +13,5 @@
13
13
  end
14
14
  ```
15
15
  原因、解決法のわかるからがいらっしゃいましたらご教示お願いいたします。
16
+ またそのほかに原因じゃないかと思われる点などございましたらお教えいただけますとありがたいです。
16
17