質問編集履歴
2
s3
test
CHANGED
File without changes
|
test
CHANGED
@@ -39,3 +39,17 @@
|
|
39
39
|
![](0fd08f3b72217b2e42e8844646886c12.png)
|
40
40
|
|
41
41
|
![](ab324cf59d866761c33b5b60edd044d5.png)
|
42
|
+
|
43
|
+
|
44
|
+
|
45
|
+
|
46
|
+
|
47
|
+
### 追記の追記
|
48
|
+
|
49
|
+
config/environments/development.rbで、config.active_storage.service = :localという記述があるのを目にしました。
|
50
|
+
|
51
|
+
s3バケットなどを使っていなかったので、現在s3を導入してconfig.active_storage.service = :amazonに変更しようと考えております。
|
52
|
+
|
53
|
+
|
54
|
+
|
55
|
+
画像の投稿時に500エラーが出るのですが、上記は関係あるとみていいのですかね。。。
|
1
画像追加
test
CHANGED
File without changes
|
test
CHANGED
@@ -28,246 +28,14 @@
|
|
28
28
|
|
29
29
|
|
30
30
|
|
31
|
-
|
31
|
+
### 追記
|
32
32
|
|
33
|
-
|
33
|
+
検証ツールにて画像つきで投稿ボタンを押した際には、Failed to load resource: the server responded with a status of 500 ()が出ました。
|
34
34
|
|
35
|
-
[ec2-user@ log]$ tail -n 300 development.log
|
36
|
-
|
37
|
-
Cannot render console from 172.xx.xx.xxx! Allowed networks: 172.xx.xx.xxx, xxx.0.0.0/xxx.xxx.xxx.xxx, ::1
|
38
|
-
|
39
|
-
Processing by Users::SessionsController#destroy as HTML
|
40
|
-
|
41
|
-
Parameters: {"authenticity_token"=>"EUcYPjmYnjDYi0+Qi57szlhQCIq9NwPBsFVQ8PPBk1cU5r8cwiJenUyU3CUwHI6ItCxwGb7l8P2De0QxAAw95g=="}
|
42
|
-
|
43
|
-
User Load (0.3ms) SELECT `users`.* FROM `users` WHERE `users`.`id` = 2 ORDER BY `users`.`id` ASC LIMIT 1
|
44
|
-
|
45
|
-
↳ /home/ec2-user/.rbenv/versions/2.6.3/bin/unicorn_rails:23
|
46
|
-
|
47
|
-
|
35
|
+
画像を貼らせていただきます。
|
48
|
-
|
49
|
-
↳ /home/ec2-user/.rbenv/versions/2.6.3/bin/unicorn_rails:23
|
50
|
-
|
51
|
-
(0.1ms) COMMIT
|
52
|
-
|
53
|
-
↳ /home/ec2-user/.rbenv/versions/2.6.3/bin/unicorn_rails:23
|
54
|
-
|
55
|
-
Redirected to https://tuittaa.com/
|
56
|
-
|
57
|
-
Completed 302 Found in 4ms (ActiveRecord: 0.6ms)
|
58
36
|
|
59
37
|
|
60
38
|
|
39
|
+
![](0fd08f3b72217b2e42e8844646886c12.png)
|
61
40
|
|
62
|
-
|
63
|
-
Started GET "/" for 133.32.224.4 at 2021-12-07 04:10:53 +0000
|
64
|
-
|
65
|
-
User Load (0.3ms) SELECT `users`.* FROM `users` WHERE `users`.`id` = 3 ORDER BY `users`.`id` ASC LIMIT 1
|
66
|
-
|
67
|
-
↳ /home/ec2-user/.rbenv/versions/2.6.3/bin/unicorn_rails:23
|
68
|
-
|
69
|
-
Rendering posts/index.html.erb within layouts/application
|
70
|
-
|
71
|
-
Rendered common/_sidebar.html.erb (0.9ms)
|
72
|
-
|
73
|
-
(0.2ms) SELECT COUNT(*) FROM `posts`
|
74
|
-
|
75
|
-
↳ app/views/posts/index.html.erb:22
|
76
|
-
|
77
|
-
(0.2ms) SELECT COUNT(*) FROM `users`
|
78
|
-
|
79
|
-
↳ app/views/posts/index.html.erb:26
|
80
|
-
|
81
|
-
Rendered layouts/_error_messages.html.erb (0.3ms)
|
82
|
-
|
83
|
-
Post Load (0.2ms) SELECT `posts`.* FROM `posts` ORDER BY `posts`.`created_at` DESC
|
84
|
-
|
85
|
-
↳ app/views/posts/_index.html.erb:2
|
86
|
-
|
87
|
-
User Load (0.2ms) SELECT `users`.* FROM `users` WHERE `users`.`id` = 8 LIMIT 1
|
88
|
-
|
89
|
-
↳ app/views/posts/_index.html.erb:10
|
90
|
-
|
91
|
-
ActiveStorage::Attachment Load (0.2ms) SELECT `active_storage_attachments`.* FROM `active_storage_attachments` WHERE `active_storage_attachments`.`record_id` = 23 AND `active_storage_attachments`.`record_type` = 'Post' AND `active_storage_attachments`.`name` = 'images'
|
92
|
-
|
93
|
-
↳ app/views/posts/_index.html.erb:52
|
94
|
-
|
95
|
-
Like Exists (0.2ms) SELECT 1 AS one FROM `likes` WHERE `likes`.`user_id` = 3 AND `likes`.`post_id` = 23 LIMIT 1
|
96
|
-
|
97
|
-
↳ app/models/user.rb:17
|
98
|
-
|
99
|
-
(0.2ms) SELECT COUNT(*) FROM `likes` WHERE `likes`.`post_id` = 23
|
100
|
-
|
101
|
-
↳ app/views/posts/_post.html.erb:13
|
102
|
-
|
103
|
-
Rendered posts/_post.html.erb (2.0ms)
|
104
|
-
|
105
|
-
User Load (0.2ms) SELECT `users`.* FROM `users` WHERE `users`.`id` = 5 LIMIT 1
|
106
|
-
|
107
|
-
↳ app/views/posts/_index.html.erb:10
|
108
|
-
|
109
|
-
ActiveStorage::Attachment Load (0.2ms) SELECT `active_storage_attachments`.* FROM `active_storage_attachments` WHERE `active_storage_attachments`.`record_id` = 22 AND `active_storage_attachments`.`record_type` = 'Post' AND `active_storage_attachments`.`name` = 'images'
|
110
|
-
|
111
|
-
↳ app/views/posts/_index.html.erb:52
|
112
|
-
|
113
|
-
Like Exists (0.2ms) SELECT 1 AS one FROM `likes` WHERE `likes`.`user_id` = 3 AND `likes`.`post_id` = 22 LIMIT 1
|
114
|
-
|
115
|
-
↳ app/models/user.rb:17
|
116
|
-
|
117
|
-
(0.2ms) SELECT COUNT(*) FROM `likes` WHERE `likes`.`post_id` = 22
|
118
|
-
|
119
|
-
↳ app/views/posts/_post.html.erb:13
|
120
|
-
|
121
|
-
Rendered posts/_post.html.erb (1.5ms)
|
122
|
-
|
123
|
-
CACHE User Load (0.0ms) SELECT `users`.* FROM `users` WHERE `users`.`id` = 5 LIMIT 1 [["id", 5], ["LIMIT", 1]]
|
124
|
-
|
125
|
-
↳ app/views/posts/_index.html.erb:10
|
126
|
-
|
127
|
-
ActiveStorage::Attachment Load (0.2ms) SELECT `active_storage_attachments`.* FROM `active_storage_attachments` WHERE `active_storage_attachments`.`record_id` = 21 AND `active_storage_attachments`.`record_type` = 'Post' AND `active_storage_attachments`.`name` = 'images'
|
128
|
-
|
129
|
-
↳ app/views/posts/_index.html.erb:52
|
130
|
-
|
131
|
-
Like Exists (0.2ms) SELECT 1 AS one FROM `likes` WHERE `likes`.`user_id` = 3 AND `likes`.`post_id` = 21 LIMIT 1
|
132
|
-
|
133
|
-
↳ app/models/user.rb:17
|
134
|
-
|
135
|
-
(0.2ms) SELECT COUNT(*) FROM `likes` WHERE `likes`.`post_id` = 21
|
136
|
-
|
137
|
-
↳ app/views/posts/_post.html.erb:13
|
138
|
-
|
139
|
-
Rendered posts/_post.html.erb (1.5ms)
|
140
|
-
|
141
|
-
CACHE User Load (0.0ms) SELECT `users`.* FROM `users` WHERE `users`.`id` = 5 LIMIT 1 [["id", 5], ["LIMIT", 1]]
|
142
|
-
|
143
|
-
↳ app/views/posts/_index.html.erb:10
|
144
|
-
|
145
|
-
ActiveStorage::Attachment Load (0.2ms) SELECT `active_storage_attachments`.* FROM `active_storage_attachments` WHERE `active_storage_attachments`.`record_id` = 20 AND `active_storage_attachments`.`record_type` = 'Post' AND `active_storage_attachments`.`name` = 'images'
|
146
|
-
|
147
|
-
↳ app/views/posts/_index.html.erb:52
|
148
|
-
|
149
|
-
Like Exists (0.2ms) SELECT 1 AS one FROM `likes` WHERE `likes`.`user_id` = 3 AND `likes`.`post_id` = 20 LIMIT 1
|
150
|
-
|
151
|
-
↳ app/models/user.rb:17
|
152
|
-
|
153
|
-
(0.2ms) SELECT COUNT(*) FROM `likes` WHERE `likes`.`post_id` = 20
|
154
|
-
|
155
|
-
↳ app/views/posts/_post.html.erb:13
|
156
|
-
|
157
|
-
Rendered posts/_post.html.erb (1.4ms)
|
158
|
-
|
159
|
-
CACHE User Load (0.0ms) SELECT `users`.* FROM `users` WHERE `users`.`id` = 5 LIMIT 1 [["id", 5], ["LIMIT", 1]]
|
160
|
-
|
161
|
-
↳ app/views/posts/_index.html.erb:10
|
162
|
-
|
163
|
-
ActiveStorage::Attachment Load (0.2ms) SELECT `active_storage_attachments`.* FROM `active_storage_attachments` WHERE `active_storage_attachments`.`record_id` = 19 AND `active_storage_attachments`.`record_type` = 'Post' AND `active_storage_attachments`.`name` = 'images'
|
164
|
-
|
165
|
-
↳ app/views/posts/_index.html.erb:52
|
166
|
-
|
167
|
-
Like Exists (0.2ms) SELECT 1 AS one FROM `likes` WHERE `likes`.`user_id` = 3 AND `likes`.`post_id` = 19 LIMIT 1
|
168
|
-
|
169
|
-
↳ app/models/user.rb:17
|
170
|
-
|
171
|
-
(0.2ms) SELECT COUNT(*) FROM `likes` WHERE `likes`.`post_id` = 19
|
172
|
-
|
173
|
-
↳ app/views/posts/_post.html.erb:13
|
174
|
-
|
175
|
-
Rendered posts/_post.html.erb (1.4ms)
|
176
|
-
|
177
|
-
User Load (0.2ms) SELECT `users`.* FROM `users` WHERE `users`.`id` = 3 LIMIT 1
|
178
|
-
|
179
|
-
↳ app/views/posts/_index.html.erb:10
|
180
|
-
|
181
|
-
ActiveStorage::Attachment Load (0.2ms) SELECT `active_storage_attachments`.* FROM `active_storage_attachments` WHERE `active_storage_attachments`.`record_id` = 18 AND `active_storage_attachments`.`record_type` = 'Post' AND `active_storage_attachments`.`name` = 'images'
|
182
|
-
|
183
|
-
↳ app/views/posts/_index.html.erb:52
|
184
|
-
|
185
|
-
Like Exists (0.2ms) SELECT 1 AS one FROM `likes` WHERE `likes`.`user_id` = 3 AND `likes`.`post_id` = 18 LIMIT 1
|
186
|
-
|
187
|
-
↳ app/models/user.rb:17
|
188
|
-
|
189
|
-
(0.2ms) SELECT COUNT(*) FROM `likes` WHERE `likes`.`post_id` = 18
|
190
|
-
|
191
|
-
↳ app/views/posts/_post.html.erb:5
|
192
|
-
|
193
|
-
Rendered posts/_post.html.erb (1.4ms)
|
194
|
-
|
195
|
-
Rendered posts/_index.html.erb (24.7ms)
|
196
|
-
|
197
|
-
User Load (0.2ms) SELECT `users`.* FROM `users` INNER JOIN `relationships` ON `users`.`id` = `relationships`.`followed_id` WHERE `relationships`.`follower_id` = 3
|
198
|
-
|
199
|
-
↳ app/views/posts/index.html.erb:107
|
200
|
-
|
201
|
-
User Load (0.2ms) SELECT `users`.* FROM `users` INNER JOIN `relationships` ON `users`.`id` = `relationships`.`follower_id` WHERE `relationships`.`followed_id` = 3
|
202
|
-
|
203
|
-
↳ app/views/posts/index.html.erb:125
|
204
|
-
|
205
|
-
ActiveStorage::Attachment Load (0.2ms) SELECT `active_storage_attachments`.* FROM `active_storage_attachments` WHERE `active_storage_attachments`.`record_id` = 5 AND `active_storage_attachments`.`record_type` = 'User' AND `active_storage_attachments`.`name` = 'profile_image' LIMIT 1
|
206
|
-
|
207
|
-
↳ app/models/user.rb:25
|
208
|
-
|
209
|
-
ActiveStorage::Attachment Load (0.3ms) SELECT `active_storage_attachments`.* FROM `active_storage_attachments` WHERE `active_storage_attachments`.`record_id` = 8 AND `active_storage_attachments`.`record_type` = 'User' AND `active_storage_attachments`.`name` = 'profile_image' LIMIT 1
|
210
|
-
|
211
|
-
↳ app/models/user.rb:25
|
212
|
-
|
213
|
-
Rendered posts/index.html.erb within layouts/application (37.0ms)
|
214
|
-
|
215
|
-
Completed 200 OK in 78ms (Views: 70.1ms | ActiveRecord: 6.1ms)
|
216
|
-
|
217
|
-
|
218
|
-
|
219
|
-
|
220
|
-
|
221
|
-
Started GET "/" for 127.0.0.1 at 2021-12-07 04:11:02 +0000
|
222
|
-
|
223
|
-
Processing by PostsController#index as HTML
|
224
|
-
|
225
|
-
Completed 401 Unauthorized in 0ms (ActiveRecord: 0.0ms)
|
226
|
-
|
227
|
-
|
228
|
-
|
229
|
-
|
230
|
-
|
231
|
-
Started GET "/" for 127.0.0.1 at 2021-12-07 04:11:17 +0000
|
232
|
-
|
233
|
-
Cannot render console from 172.31.36.234! Allowed networks: 172.31.30.255, 127.0.0.0/127.255.255.255, ::1
|
234
|
-
|
235
|
-
Processing by PostsController#index as HTML
|
236
|
-
|
237
|
-
Completed 401 Unauthorized in 0ms (ActiveRecord: 0.0ms)
|
238
|
-
|
239
|
-
|
240
|
-
|
241
|
-
|
242
|
-
|
243
|
-
Started GET "/" for 127.0.0.1 at 2021-12-07 04:11:32 +0000
|
244
|
-
|
245
|
-
Processing by PostsController#index as HTML
|
246
|
-
|
247
|
-
Completed 401 Unauthorized in 0ms (ActiveRecord: 0.0ms)
|
248
|
-
|
249
|
-
|
250
|
-
|
251
|
-
|
252
|
-
|
253
|
-
Started GET "/" for 127.0.0.1 at 2021-12-07 04:11:48 +0000
|
254
|
-
|
255
|
-
Cannot render console from 172.31.36.234! Allowed networks: 172.31.30.255, 127.0.0.0/127.255.255.255, ::1
|
256
|
-
|
257
|
-
Processing by PostsController#index as HTML
|
258
|
-
|
259
|
-
Completed 401 Unauthorized in 0ms (ActiveRecord: 0.0ms)
|
260
|
-
|
261
|
-
|
262
|
-
|
263
|
-
|
264
|
-
|
265
|
-
Started GET "/" for 127.0.0.1 at 2021-12-07 04:12:02 +0000
|
266
|
-
|
267
|
-
Processing by PostsController#index as HTML
|
268
|
-
|
269
|
-
Completed 401 Unauthorized in 0ms (ActiveRecord: 0.0ms)
|
270
|
-
|
271
|
-
|
272
|
-
|
273
|
-
```
|
41
|
+
![](ab324cf59d866761c33b5b60edd044d5.png)
|