質問編集履歴
2
わかりやすく
test
CHANGED
File without changes
|
test
CHANGED
@@ -28,9 +28,9 @@
|
|
28
28
|
|
29
29
|
**ターミナル**
|
30
30
|
|
31
|
-
2020-12-28T02:50:08.743780+00:00 heroku[router]: at=info method=GET path="/users/sign_in"
|
31
|
+
2020-12-28T02:50:08.743780+00:00 heroku[router]: at=info method=GET path="/users/sign_in" request_id=2fce4110-0334-470a-9640-892aef72ac26 fwd="126.179.117.147" dyno=web.1 connect=1ms service=184ms status=500 bytes=1827 protocol=https
|
32
32
|
|
33
|
-
2020-12-28T02:50:09.190026+00:00 heroku[router]: at=info method=GET path="/favicon.ico"
|
33
|
+
2020-12-28T02:50:09.190026+00:00 heroku[router]: at=info method=GET path="/favicon.ico" request_id=e560c138-1b24-4c30-b5c3-882b796a89bd fwd="126.179.117.147" dyno=web.1 connect=1ms service=2ms status=200 bytes=143 protocol=https
|
34
34
|
|
35
35
|
```
|
36
36
|
|
1
わかりやすく
test
CHANGED
@@ -1 +1 @@
|
|
1
|
-
|
1
|
+
heroku open したらWe're sorry, but something went wrong.と出る
|
test
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
|
3
3
|
|
4
4
|
|
5
|
-
|
5
|
+
ブラウザに表示させたい
|
6
6
|
|
7
7
|
|
8
8
|
|
@@ -12,7 +12,7 @@
|
|
12
12
|
|
13
13
|
```
|
14
14
|
|
15
|
-
|
15
|
+
We're sorry, but something went wrong
|
16
16
|
|
17
17
|
```
|
18
18
|
|
@@ -20,89 +20,17 @@
|
|
20
20
|
|
21
21
|
### 該当のソースコード
|
22
22
|
|
23
|
+
エラーの意味がわからなくどこを変更すればいいのかわからないのでご教授いただきたいです。よろしくお願い致します。
|
23
24
|
|
24
|
-
|
25
|
-
```ruby
|
26
|
-
|
27
|
-
**items/_prot.html.erb**
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
25
|
+
以下はheroku logs -tした後のターミナルになります。
|
32
|
-
|
33
|
-
<%= link_to image_tag( @items.image, class: :card__img ), root_path %>
|
34
|
-
|
35
|
-
</div>
|
36
26
|
|
37
27
|
```
|
38
28
|
|
39
|
-
|
29
|
+
**ターミナル**
|
40
30
|
|
31
|
+
2020-12-28T02:50:08.743780+00:00 heroku[router]: at=info method=GET path="/users/sign_in" host=omoide4.herokuapp.com request_id=2fce4110-0334-470a-9640-892aef72ac26 fwd="126.179.117.147" dyno=web.1 connect=1ms service=184ms status=500 bytes=1827 protocol=https
|
41
32
|
|
42
|
-
|
43
|
-
**items/index.html.erb**
|
44
|
-
|
45
|
-
<div class="card__wrapper">
|
46
|
-
|
47
|
-
<%= render partial: 'prot', collection: @items %>
|
48
|
-
|
49
|
-
</div>
|
50
|
-
|
51
|
-
```
|
52
|
-
|
53
|
-
```ruby
|
54
|
-
|
55
|
-
**items_contllore**
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
class ItemsController < ApplicationController
|
60
|
-
|
61
|
-
def index
|
62
|
-
|
63
|
-
@items = Item.includes(:user)
|
64
|
-
|
65
|
-
end
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
def new
|
70
|
-
|
71
|
-
@item = Item.new
|
72
|
-
|
73
|
-
end
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
def create
|
78
|
-
|
79
|
-
@item = Item.new(item_params)
|
80
|
-
|
81
|
-
if @item.save
|
82
|
-
|
83
|
-
redirect_to root_path
|
84
|
-
|
85
|
-
else
|
86
|
-
|
87
|
-
render :new
|
88
|
-
|
89
|
-
end
|
90
|
-
|
91
|
-
end
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
private
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
def item_params
|
100
|
-
|
101
|
-
params.require(:item).permit(:title, :days, :image).merge(user_id: current_user.id)
|
102
|
-
|
103
|
-
end
|
104
|
-
|
105
|
-
end
|
33
|
+
2020-12-28T02:50:09.190026+00:00 heroku[router]: at=info method=GET path="/favicon.ico" host=omoide4.herokuapp.com request_id=e560c138-1b24-4c30-b5c3-882b796a89bd fwd="126.179.117.147" dyno=web.1 connect=1ms service=2ms status=200 bytes=143 protocol=https
|
106
34
|
|
107
35
|
```
|
108
36
|
|
@@ -110,64 +38,38 @@
|
|
110
38
|
|
111
39
|
**ターミナル**
|
112
40
|
|
113
|
-
|
41
|
+
2020-12-28T03:02:26.365560+00:00 heroku[web.1]: Process exited with status 143
|
114
42
|
|
115
|
-
|
43
|
+
2020-12-28T03:02:28.000000+00:00 app[api]: Build succeeded
|
116
44
|
|
117
|
-
|
45
|
+
2020-12-28T03:02:33.970726+00:00 heroku[web.1]: Starting process with command `bin/rails server -p ${PORT:-5000} -e production`
|
118
46
|
|
119
|
-
|
47
|
+
2020-12-28T03:02:41.592636+00:00 app[web.1]: => Booting Puma
|
120
48
|
|
121
|
-
|
49
|
+
2020-12-28T03:02:41.592659+00:00 app[web.1]: => Rails 6.0.3.4 application starting in production
|
122
50
|
|
51
|
+
2020-12-28T03:02:41.592660+00:00 app[web.1]: => Run `rails server --help` for more startup options
|
52
|
+
|
53
|
+
2020-12-28T03:02:47.059098+00:00 app[web.1]: Puma starting in single mode...
|
54
|
+
|
55
|
+
2020-12-28T03:02:47.059145+00:00 app[web.1]: * Version 3.12.6 (ruby 2.6.5-p114), codename: Llamas in Pajamas
|
56
|
+
|
57
|
+
2020-12-28T03:02:47.059146+00:00 app[web.1]: * Min threads: 5, max threads: 5
|
58
|
+
|
59
|
+
2020-12-28T03:02:47.059147+00:00 app[web.1]: * Environment: production
|
60
|
+
|
61
|
+
2020-12-28T03:02:47.059381+00:00 app[web.1]: * Listening on tcp://0.0.0.0:13380
|
62
|
+
|
123
|
-
|
63
|
+
2020-12-28T03:02:47.059736+00:00 app[web.1]: Use Ctrl-C to stop
|
64
|
+
|
65
|
+
2020-12-28T03:02:47.496005+00:00 heroku[web.1]: State changed from starting to up
|
124
66
|
|
125
67
|
```
|
126
68
|
|
127
69
|
### 試したこと
|
128
70
|
|
129
|
-
|
71
|
+
> https://qiita.com/hrtkmztn/items/209ab6dc646bfc7f9432
|
130
72
|
|
131
|
-
|
73
|
+
gem 'rails_12factor', group: :production
|
132
74
|
|
133
|
-
ご教授いただけると幸いです。よろしくお願い致します。
|
134
|
-
|
135
|
-
|
136
|
-
|
137
|
-
|
138
|
-
|
139
|
-
### 補足情報(FW/ツールのバージョンなど)
|
140
|
-
|
141
|
-
|
142
|
-
|
143
|
-
ここにより詳細な情報を記載してください。
|
144
|
-
|
145
|
-
|
75
|
+
gem をインストールしましたが、使えているのかよくわかりません。
|
146
|
-
|
147
|
-
```ruby
|
148
|
-
|
149
|
-
**items/_prot.html.erb**
|
150
|
-
|
151
|
-
|
152
|
-
|
153
|
-
<div class="card">
|
154
|
-
|
155
|
-
<%= link_to image_tag(item.image, class: :card__img ), root_path %>
|
156
|
-
|
157
|
-
</div>
|
158
|
-
|
159
|
-
```
|
160
|
-
|
161
|
-
```ruby
|
162
|
-
|
163
|
-
|
164
|
-
|
165
|
-
**items/index.html.erb**
|
166
|
-
|
167
|
-
<div class="card__wrapper">
|
168
|
-
|
169
|
-
<%= render partial: 'prot', collection: @items %>
|
170
|
-
|
171
|
-
</div>
|
172
|
-
|
173
|
-
```
|