質問編集履歴
3
エラー内容の更新
test
CHANGED
File without changes
|
test
CHANGED
@@ -14,9 +14,11 @@
|
|
14
14
|
|
15
15
|
```
|
16
16
|
|
17
|
-
|
17
|
+
RuntimeError in MessagesController#create
|
18
|
-
|
18
|
+
|
19
|
+
|
20
|
+
|
19
|
-
|
21
|
+
Cannot load `Rails.config.active_storage.service`: Missing configuration for the :amazon Active Storage service. Configurations available for [:test, :local]
|
20
22
|
|
21
23
|
```
|
22
24
|
|
@@ -26,49 +28,37 @@
|
|
26
28
|
|
27
29
|
```
|
28
30
|
|
31
|
+
Started POST "/messages" for ::1 at 2021-01-20 09:19:53 +0900
|
32
|
+
|
33
|
+
(0.3ms) SET NAMES utf8, @@SESSION.sql_mode = CONCAT(CONCAT(@@sql_mode, ',STRICT_ALL_TABLES'), ',NO_AUTO_VALUE_ON_ZERO'), @@SESSION.sql_auto_is_null = 0, @@SESSION.wait_timeout = 2147483
|
34
|
+
|
29
35
|
Processing by MessagesController#create as HTML
|
30
36
|
|
31
|
-
Parameters: {"authenticity_token"=>"
|
37
|
+
Parameters: {"authenticity_token"=>"LJj60SrIJ/gF3QdWFHDEFngtOgJU2WcGyiZtrmPgzYAJO4eemjqfnIdkJu/BBHtNs+cAENC9ww/1cbmaNGbUtw==", "message_tag"=>{"title"=>"アイウエオ", "message"=>"ooooooo", "whom"=>"さしすせそ", "open_plan(1i)"=>"2025", "open_plan(2i)"=>"7", "open_plan(3i)"=>"6", "images"=>[#<ActionDispatch::Http::UploadedFile:0x00007fc1cc861790 @tempfile=#<Tempfile:/var/folders/pg/6dn2c_091hb4pfr45vz6w9fr0000gn/T/RackMultipart20210120-1154-1pq5qrm.png>, @original_filename="Railsの処理の流れ_0409.png", @content_type="image/png", @headers="Content-Disposition: form-data; name=\"message_tag[images][]\"; filename=\"Rails\xE3\x81\xAE\xE5\x87\xA6\xE7\x90\x86\xE3\x81\xAE\xE6\xB5\x81\xE3\x82\x8C_0409.png\"\r\nContent-Type: image/png\r\n">], "name"=>"S3テスト"}, "commit"=>"想いを残す"}
|
32
38
|
|
33
39
|
User Load (0.3ms) SELECT `users`.* FROM `users` WHERE `users`.`id` = 1 ORDER BY `users`.`id` ASC LIMIT 1
|
34
40
|
|
35
|
-
(0.
|
41
|
+
(0.2ms) BEGIN
|
36
42
|
|
37
43
|
↳ app/models/message_tag.rb:21:in `save'
|
38
44
|
|
39
|
-
User Load (0.
|
45
|
+
User Load (0.2ms) SELECT `users`.* FROM `users` WHERE `users`.`id` = 1 LIMIT 1
|
40
46
|
|
41
47
|
↳ app/models/message_tag.rb:21:in `save'
|
42
48
|
|
43
|
-
Message Create (
|
49
|
+
Message Create (1.1ms) INSERT INTO `messages` (`title`, `whom`, `message`, `open_plan`, `user_id`, `created_at`, `updated_at`) VALUES ('アイウエオ', 'さしすせそ', 'ooooooo', '2025-07-06', 1, '2021-01-20 00:19:53.378596', '2021-01-20 00:19:53.378596')
|
44
50
|
|
45
51
|
↳ app/models/message_tag.rb:21:in `save'
|
46
52
|
|
47
|
-
ActiveStorage::Attachment Load (0.
|
53
|
+
ActiveStorage::Attachment Load (0.4ms) SELECT `active_storage_attachments`.* FROM `active_storage_attachments` WHERE `active_storage_attachments`.`record_id` = 82 AND `active_storage_attachments`.`record_type` = 'Message' AND `active_storage_attachments`.`name` = 'images'
|
48
54
|
|
49
55
|
↳ app/models/message_tag.rb:21:in `save'
|
50
56
|
|
51
|
-
|
57
|
+
(0.5ms) ROLLBACK
|
52
58
|
|
53
59
|
↳ app/models/message_tag.rb:21:in `save'
|
54
60
|
|
55
|
-
|
56
|
-
|
57
|
-
↳ app/models/message_tag.rb:21:in `save'
|
58
|
-
|
59
|
-
ActiveStorage::Attachment Load (0.3ms) SELECT `active_storage_attachments`.* FROM `active_storage_attachments` WHERE `active_storage_attachments`.`record_id` = 60 AND `active_storage_attachments`.`record_type` = 'Message' AND `active_storage_attachments`.`name` = 'video' LIMIT 1
|
60
|
-
|
61
|
-
↳ app/models/message_tag.rb:21:in `save'
|
62
|
-
|
63
|
-
Message Update (0.2ms) UPDATE `messages` SET `messages`.`updated_at` = '2021-01-19 15:09:27.624963' WHERE `messages`.`id` = 60
|
64
|
-
|
65
|
-
↳ app/models/message_tag.rb:21:in `save'
|
66
|
-
|
67
|
-
(1.3ms) COMMIT
|
68
|
-
|
69
|
-
↳ app/models/message_tag.rb:21:in `save'
|
70
|
-
|
71
|
-
Completed 500 Internal Server Error in 61ms (ActiveRecord: 3.5ms | Allocations: 14014)
|
61
|
+
Completed 500 Internal Server Error in 39ms (ActiveRecord: 2.7ms | Allocations: 32823)
|
72
62
|
|
73
63
|
|
74
64
|
|
@@ -76,7 +66,9 @@
|
|
76
66
|
|
77
67
|
|
78
68
|
|
79
|
-
|
69
|
+
RuntimeError (Cannot load `Rails.config.active_storage.service`:
|
70
|
+
|
71
|
+
Missing configuration for the :amazon Active Storage service. Configurations available for [:test, :local]):
|
80
72
|
|
81
73
|
|
82
74
|
|
2
現状の更新
test
CHANGED
File without changes
|
test
CHANGED
@@ -20,6 +20,8 @@
|
|
20
20
|
|
21
21
|
```
|
22
22
|
|
23
|
+
データベースには記入データが保存されていますが詳細ページに遷移しても画像データは表示されていません
|
24
|
+
|
23
25
|
|
24
26
|
|
25
27
|
```
|
1
ターミナルでの情報
test
CHANGED
File without changes
|
test
CHANGED
@@ -22,6 +22,70 @@
|
|
22
22
|
|
23
23
|
|
24
24
|
|
25
|
+
```
|
26
|
+
|
27
|
+
Processing by MessagesController#create as HTML
|
28
|
+
|
29
|
+
Parameters: {"authenticity_token"=>"X+mOZLRb58dIWhnGkYKGd9F2+fINsEstMnRk26yndjR6SvMrBKlfo8rjOH9E9jksGrzD4InU7yQNI7Dv+yFvAw==", "message_tag"=>{"title"=>"S3テ", "message"=>"S3", "whom"=>"S3テスト", "open_plan(1i)"=>"2025", "open_plan(2i)"=>"5", "open_plan(3i)"=>"5", "images"=>[#<ActionDispatch::Http::UploadedFile:0x00007fc1ba7d4e38 @tempfile=#<Tempfile:/var/folders/pg/6dn2c_091hb4pfr45vz6w9fr0000gn/T/RackMultipart20210120-1154-8t82gv.png>, @original_filename="Railsの処理の流れ_0409.png", @content_type="image/png", @headers="Content-Disposition: form-data; name=\"message_tag[images][]\"; filename=\"Rails\xE3\x81\xAE\xE5\x87\xA6\xE7\x90\x86\xE3\x81\xAE\xE6\xB5\x81\xE3\x82\x8C_0409.png\"\r\nContent-Type: image/png\r\n">], "name"=>"S3テスト"}, "commit"=>"想いを残す"}
|
30
|
+
|
31
|
+
User Load (0.3ms) SELECT `users`.* FROM `users` WHERE `users`.`id` = 1 ORDER BY `users`.`id` ASC LIMIT 1
|
32
|
+
|
33
|
+
(0.1ms) BEGIN
|
34
|
+
|
35
|
+
↳ app/models/message_tag.rb:21:in `save'
|
36
|
+
|
37
|
+
User Load (0.4ms) SELECT `users`.* FROM `users` WHERE `users`.`id` = 1 LIMIT 1
|
38
|
+
|
39
|
+
↳ app/models/message_tag.rb:21:in `save'
|
40
|
+
|
41
|
+
Message Create (0.2ms) INSERT INTO `messages` (`title`, `whom`, `message`, `open_plan`, `user_id`, `created_at`, `updated_at`) VALUES ('S3テ', 'S3テスト', 'S3', '2025-05-05', 1, '2021-01-19 15:09:27.575726', '2021-01-19 15:09:27.575726')
|
42
|
+
|
43
|
+
↳ app/models/message_tag.rb:21:in `save'
|
44
|
+
|
45
|
+
ActiveStorage::Attachment Load (0.2ms) SELECT `active_storage_attachments`.* FROM `active_storage_attachments` WHERE `active_storage_attachments`.`record_id` = 60 AND `active_storage_attachments`.`record_type` = 'Message' AND `active_storage_attachments`.`name` = 'images'
|
46
|
+
|
47
|
+
↳ app/models/message_tag.rb:21:in `save'
|
48
|
+
|
49
|
+
ActiveStorage::Blob Create (0.3ms) INSERT INTO `active_storage_blobs` (`key`, `filename`, `content_type`, `metadata`, `byte_size`, `checksum`, `created_at`) VALUES ('pqp3dpr4bvq76prcc50hccr4h95m', 'Railsの処理の流れ_0409.png', 'image/png', '{\"identified\":true}', 530428, 'lfjBjfDfCL0sw1R4+RO0YQ==', '2021-01-19 15:09:27')
|
50
|
+
|
51
|
+
↳ app/models/message_tag.rb:21:in `save'
|
52
|
+
|
53
|
+
ActiveStorage::Attachment Create (0.2ms) INSERT INTO `active_storage_attachments` (`name`, `record_type`, `record_id`, `blob_id`, `created_at`) VALUES ('images', 'Message', 60, 36, '2021-01-19 15:09:27')
|
54
|
+
|
55
|
+
↳ app/models/message_tag.rb:21:in `save'
|
56
|
+
|
57
|
+
ActiveStorage::Attachment Load (0.3ms) SELECT `active_storage_attachments`.* FROM `active_storage_attachments` WHERE `active_storage_attachments`.`record_id` = 60 AND `active_storage_attachments`.`record_type` = 'Message' AND `active_storage_attachments`.`name` = 'video' LIMIT 1
|
58
|
+
|
59
|
+
↳ app/models/message_tag.rb:21:in `save'
|
60
|
+
|
61
|
+
Message Update (0.2ms) UPDATE `messages` SET `messages`.`updated_at` = '2021-01-19 15:09:27.624963' WHERE `messages`.`id` = 60
|
62
|
+
|
63
|
+
↳ app/models/message_tag.rb:21:in `save'
|
64
|
+
|
65
|
+
(1.3ms) COMMIT
|
66
|
+
|
67
|
+
↳ app/models/message_tag.rb:21:in `save'
|
68
|
+
|
69
|
+
Completed 500 Internal Server Error in 61ms (ActiveRecord: 3.5ms | Allocations: 14014)
|
70
|
+
|
71
|
+
|
72
|
+
|
73
|
+
|
74
|
+
|
75
|
+
|
76
|
+
|
77
|
+
NoMethodError (undefined method `upload' for nil:NilClass):
|
78
|
+
|
79
|
+
|
80
|
+
|
81
|
+
app/models/message_tag.rb:21:in `save'
|
82
|
+
|
83
|
+
app/controllers/messages_controller.rb:17:in `create'
|
84
|
+
|
85
|
+
|
86
|
+
|
87
|
+
```
|
88
|
+
|
25
89
|
### 該当のソースコード
|
26
90
|
|
27
91
|
|