質問編集履歴

2

追記

2022/12/31 13:01

投稿

退会済みユーザー
test CHANGED
File without changes
test CHANGED
@@ -4,6 +4,10 @@
4
4
  ActionView::Template::Error (undefined method `decode' for URI:Module):
5
5
  というエラーです。
6
6
  調べてもdecodeに関する情報が少ないのですが、これはどういうエラーなのでしょうか?
7
+
8
+ バージョン
9
+ ruby 3.0.0p0 (2020-12-25 revision 95aff21468) [x86_64-linux]
10
+ Rails 6.1.7
7
11
 
8
12
  エラーログ
9
13
  ```

1

修正

2022/12/31 09:58

投稿

退会済みユーザー
test CHANGED
File without changes
test CHANGED
@@ -7,18 +7,19 @@
7
7
 
8
8
  エラーログ
9
9
  ```
10
- 2022-12-30T03:02:24.090658+00:00 app[web.1]: F, [2022-12-30T03:02:24.090617 #4] FATAL -- : [cb063962-3a8a-495e-975a-fbb97336c2e8]
11
- 2022-12-30T03:02:24.090659+00:00 app[web.1]: [cb063962-3a8a-495e-975a-fbb97336c2e8] ActionView::Template::Error (undefined method `decode' for URI:Module):
12
- 2022-12-30T03:02:24.090660+00:00 app[web.1]: [cb063962-3a8a-495e-975a-fbb97336c2e8] 65: <% @my_plans.each do |plan| %>!
13
- 2022-12-30T03:02:24.090660+00:00 app[web.1]: [cb063962-3a8a-495e-975a-fbb97336c2e8] 66: <div class="card" style="width: 210px;">
14
- 2022-12-30T03:02:24.090661+00:00 app[web.1]: [cb063962-3a8a-495e-975a-fbb97336c2e8] 67: <a href="/plans/<%= plan.id %>" target="_blank" rel="noopener noreferrer" class="text-dark">
15
- 2022-12-30T03:02:24.090661+00:00 app[web.1]: [cb063962-3a8a-495e-975a-fbb97336c2e8] 68: <p><%= image_tag(plan.photo.url, :alt => '最新投稿') %></p>
16
- 2022-12-30T03:02:24.090661+00:00 app[web.1]: [cb063962-3a8a-495e-975a-fbb97336c2e8] 69: <div class="card-body">
17
- 2022-12-30T03:02:24.090662+00:00 app[web.1]: [cb063962-3a8a-495e-975a-fbb97336c2e8] 70: <h5 class="card-title"><p><%= plan.user.name %></p></h5>
18
- 2022-12-30T03:02:24.090662+00:00 app[web.1]: [cb063962-3a8a-495e-975a-fbb97336c2e8] 71: <h6 class="card-text"><p><%= plan.title %></p></h6>
19
- 2022-12-30T03:02:24.090663+00:00 app[web.1]: [cb063962-3a8a-495e-975a-fbb97336c2e8]
20
- 2022-12-30T03:02:24.090664+00:00 app[web.1]: [cb063962-3a8a-495e-975a-fbb97336c2e8] app/views/users/show.html.erb:68
21
- 2022-12-30T03:02:24.090665+00:00 app[web.1]: [cb063962-3a8a-495e-975a-fbb97336c2e8] app/views/users/show.html.erb:65
10
+ 2022-12-31T09:56:17.582496+00:00 app[web.1]: I, [2022-12-31T09:56:17.582463 #4] INFO -- : [11d421a8-a463-4609-aa8d-bcb583eb6595] Completed 500 Internal Server Error in 45ms (ActiveRecord: 12.4ms | Allocations: 18639)
11
+ 2022-12-31T09:56:17.583544+00:00 app[web.1]: F, [2022-12-31T09:56:17.583499 #4] FATAL -- : [11d421a8-a463-4609-aa8d-bcb583eb6595]
12
+ 2022-12-31T09:56:17.583546+00:00 app[web.1]: [11d421a8-a463-4609-aa8d-bcb583eb6595] ActionView::Template::Error (undefined method `decode' for URI:Module):
13
+ 2022-12-31T09:56:17.583546+00:00 app[web.1]: [11d421a8-a463-4609-aa8d-bcb583eb6595] 66: <% @my_plans.each do |plan| %>
14
+ 2022-12-31T09:56:17.583546+00:00 app[web.1]: [11d421a8-a463-4609-aa8d-bcb583eb6595] 67: <div class="card" style="width: 210px;">
15
+ 2022-12-31T09:56:17.583547+00:00 app[web.1]: [11d421a8-a463-4609-aa8d-bcb583eb6595] 68: <a href="/plans/<%= plan.id %>" target="_blank" rel="noopener noreferrer" class="text-dark">
16
+ 2022-12-31T09:56:17.583548+00:00 app[web.1]: [11d421a8-a463-4609-aa8d-bcb583eb6595] 69: <p><%= image_tag(plan.photo.url, :alt => '最新投稿') %></p>
17
+ 2022-12-31T09:56:17.583548+00:00 app[web.1]: [11d421a8-a463-4609-aa8d-bcb583eb6595] 70: <div class="card-body">
18
+ 2022-12-31T09:56:17.583548+00:00 app[web.1]: [11d421a8-a463-4609-aa8d-bcb583eb6595] 71: <h5 class="card-title"><p><%= plan.user.name %></p></h5>
19
+ 2022-12-31T09:56:17.583549+00:00 app[web.1]: [11d421a8-a463-4609-aa8d-bcb583eb6595] 72: <h6 class="card-text"><p><%= plan.title %></p></h6>
20
+ 2022-12-31T09:56:17.583549+00:00 app[web.1]: [11d421a8-a463-4609-aa8d-bcb583eb6595]
21
+ 2022-12-31T09:56:17.583550+00:00 app[web.1]: [11d421a8-a463-4609-aa8d-bcb583eb6595] app/views/users/show.html.erb:69
22
+ 2022-12-31T09:56:17.583550+00:00 app[web.1]: [11d421a8-a463-4609-aa8d-bcb583eb6595] app/views/users/show.html.erb:66
22
23
  ```
23
24
 
24
25
  エラー箇所のview