質問編集履歴

1

エラー内容の記述

2019/04/11 13:49

投稿

22kk
22kk

スコア12

test CHANGED
File without changes
test CHANGED
@@ -34,7 +34,73 @@
34
34
 
35
35
  ```
36
36
 
37
- だとエラーが出てしまいます。
37
+ だと下記のエラーが出てしまいます。
38
+
39
+
40
+
41
+
42
+
43
+ NoMethodError in Blogs#index
44
+
45
+ Showing /home/ec2-user/environment/blog/app/views/blogs/index.html.erb where line #2 raised:
46
+
47
+
48
+
49
+ undefined method `text' for #<Post::ActiveRecord_Relation:0x00000000039816f8>
50
+
51
+ Extracted source (around line #2):
52
+
53
+ 1
54
+
55
+ 2
56
+
57
+ 3
58
+
59
+
60
+
61
+ <div class="contents row" >
62
+
63
+ <p><%= @posts.text %></p>
64
+
65
+ </div>
66
+
67
+
68
+
69
+ Rails.root: /home/ec2-user/environment/blog
70
+
71
+
72
+
73
+ Application Trace | Framework Trace | Full Trace
74
+
75
+ app/views/blogs/index.html.erb:2:in `_app_views_blogs_index_html_erb___677146675485635492_29549740'
76
+
77
+ Request
78
+
79
+ Parameters:
80
+
81
+
82
+
83
+ None
84
+
85
+ Toggle session dump
86
+
87
+ Toggle env dump
88
+
89
+ Response
90
+
91
+ Headers:
92
+
93
+
94
+
95
+ None
96
+
97
+
98
+
99
+
100
+
101
+
102
+
103
+
38
104
 
39
105
  しかし、
40
106