teratail header banner
teratail header banner
質問するログイン新規登録

質問編集履歴

3

追記

2020/09/13 11:09

投稿

yamay
yamay

スコア5

title CHANGED
@@ -1,1 +1,1 @@
1
- rails,awsでアプリが表示がされない
1
+ rails,awsでアプリが表示がされない ActionView::Template::Error (Webpacker can't find application...
body CHANGED
@@ -185,5 +185,54 @@
185
185
  </html>
186
186
  * Connection #0 to host 54.168.30.111 left intact
187
187
  ```
188
-
189
- よろしくお願いします。
188
+ よろしくお願いします。
189
+ -------
190
+ 追記
191
+ log/production.log を確認すると、下記のログがありました。
192
+ ```
193
+ I, [2020-09-13T10:58:32.855259 #3813] INFO -- : [84cb50a5-8fa2-4e16-8738-8a562cd02d2d] Completed 500 Internal Server Error in 77ms (ActiveRecord: 28.3ms | Allocations: 3110)
194
+ F, [2020-09-13T10:58:32.856049 #3813] FATAL -- : [84cb50a5-8fa2-4e16-8738-8a562cd02d2d]
195
+ [84cb50a5-8fa2-4e16-8738-8a562cd02d2d] ActionView::Template::Error (Webpacker can't find application in /var/www/rails/sampleapp/public/packs/manifest.json. Possible causes:
196
+ 1. You want to set webpacker.yml value of compile to true for your environment
197
+ unless you are using the `webpack -w` or the webpack-dev-server.
198
+ 2. webpack has not yet re-run to reflect updates.
199
+ 3. You have misconfigured Webpacker's config/webpacker.yml file.
200
+ 4. Your webpack configuration is not creating a manifest.
201
+ Your manifest contains:
202
+ {
203
+ "application.js": "/packs/js/application-0cd310e1e6d4680125d7.js",
204
+ "application.js.map": "/packs/js/application-0cd310e1e6d4680125d7.js.map",
205
+ "entrypoints": {
206
+ "application": {
207
+ "js": [
208
+ "/packs/js/application-0cd310e1e6d4680125d7.js"
209
+ ],
210
+ "js.map": [
211
+ "/packs/js/application-0cd310e1e6d4680125d7.js.map"
212
+ ]
213
+ },
214
+ "hello_erb": {
215
+ "js": [
216
+ "/packs/js/hello_erb-75c67bbd677ae5fe6388.js"
217
+ ],
218
+ "js.map": [
219
+ "/packs/js/hello_erb-75c67bbd677ae5fe6388.js.map"
220
+ ]
221
+ }
222
+ },
223
+ "hello_erb.js": "/packs/js/hello_erb-75c67bbd677ae5fe6388.js",
224
+ "hello_erb.js.map": "/packs/js/hello_erb-75c67bbd677ae5fe6388.js.map",
225
+ "media/images/awdcar.png": "/packs/media/images/awdcar-0b68898bf812c7efb6ac361a17c493dc.png"
226
+ }
227
+ ):
228
+ [84cb50a5-8fa2-4e16-8738-8a562cd02d2d] 3: <%= csrf_meta_tags %>
229
+ [84cb50a5-8fa2-4e16-8738-8a562cd02d2d] 4: <%= csp_meta_tag %>
230
+ [84cb50a5-8fa2-4e16-8738-8a562cd02d2d] 5:
231
+ [84cb50a5-8fa2-4e16-8738-8a562cd02d2d] 6: <%= stylesheet_pack_tag 'application', media: 'all', 'data-turbolinks-track': 'reload' %>
232
+ [84cb50a5-8fa2-4e16-8738-8a562cd02d2d] 7: <%= javascript_pack_tag 'application', 'data-turbolinks-track': 'reload' %>
233
+ [84cb50a5-8fa2-4e16-8738-8a562cd02d2d] 8: <!--[if lt IE 9]>
234
+ [84cb50a5-8fa2-4e16-8738-8a562cd02d2d] 9: <script src="//cdnjs.cloudflare.com/ajax/libs/html5shiv/r29/html5.min.js">
235
+ [84cb50a5-8fa2-4e16-8738-8a562cd02d2d]
236
+ [84cb50a5-8fa2-4e16-8738-8a562cd02d2d] app/views/layouts/_head.html.erb:6
237
+ [84cb50a5-8fa2-4e16-8738-8a562cd02d2d] app/views/layouts/application.html.erb:3
238
+ ```

2

追記

2020/09/13 11:09

投稿

yamay
yamay

スコア5

title CHANGED
File without changes
body CHANGED
@@ -98,4 +98,92 @@
98
98
  }
99
99
  }
100
100
  ```
101
+ $ curl http://ipアドレス/ コマンドを行った結果が下記になります。(役に立つか分かりませんが、、
102
+ ```
103
+ * Trying EIP...
104
+ * TCP_NODELAY set
105
+ * Connected to EIP (EIP) port 80 (#0)
106
+ > GET / HTTP/1.1
107
+ > Host: EIP
108
+ > User-Agent: curl/7.61.1
109
+ > Accept: */*
110
+ >
111
+ < HTTP/1.1 500 Internal Server Error
112
+ < Server: nginx/1.16.1
113
+ < Date: Sun, 13 Sep 2020 09:01:43 GMT
114
+ < Content-Type: text/html; charset=UTF-8
115
+ < Content-Length: 1635
116
+ < Connection: keep-alive
117
+ < X-Request-Id: 18b9bd2a-38dd-4abe-88c5-7d8d938e5eb7
118
+ < X-Runtime: 0.111743
119
+ <
120
+ <!DOCTYPE html>
121
+ <html>
122
+ <head>
123
+ <title>We're sorry, but something went wrong (500)</title>
124
+ <meta name="viewport" content="width=device-width,initial-scale=1">
125
+ <style>
126
+ .rails-default-error-page {
127
+ background-color: #EFEFEF;
128
+ color: #2E2F30;
129
+ text-align: center;
130
+ font-family: arial, sans-serif;
131
+ margin: 0;
132
+ }
133
+
134
+ .rails-default-error-page div.dialog {
135
+ width: 95%;
136
+ max-width: 33em;
137
+ margin: 4em auto 0;
138
+ }
139
+
140
+ .rails-default-error-page div.dialog > div {
141
+ border: 1px solid #CCC;
142
+ border-right-color: #999;
143
+ border-left-color: #999;
144
+ border-bottom-color: #BBB;
145
+ border-top: #B00100 solid 4px;
146
+ border-top-left-radius: 9px;
147
+ border-top-right-radius: 9px;
148
+ background-color: white;
149
+ padding: 7px 12% 0;
150
+ box-shadow: 0 3px 8px rgba(50, 50, 50, 0.17);
151
+ }
152
+
153
+ .rails-default-error-page h1 {
154
+ font-size: 100%;
155
+ color: #730E15;
156
+ line-height: 1.5em;
157
+ }
158
+
159
+ .rails-default-error-page div.dialog > p {
160
+ margin: 0 0 1em;
161
+ padding: 1em;
162
+ background-color: #F7F7F7;
163
+ border: 1px solid #CCC;
164
+ border-right-color: #999;
165
+ border-left-color: #999;
166
+ border-bottom-color: #999;
167
+ border-bottom-left-radius: 4px;
168
+ border-bottom-right-radius: 4px;
169
+ border-top-color: #DADADA;
170
+ color: #666;
171
+ box-shadow: 0 3px 8px rgba(50, 50, 50, 0.17);
172
+ }
173
+ </style>
174
+ </head>
175
+
176
+ <body class="rails-default-error-page">
177
+ <!-- This file lives in public/500.html -->
178
+ <div class="dialog">
179
+ <div>
180
+ <h1>We're sorry, but something went wrong.</h1>
181
+ </div>
182
+ <p>If you are the application owner check the logs for more information.</p>
183
+ </div>
184
+ </body>
185
+ </html>
186
+ * Connection #0 to host 54.168.30.111 left intact
187
+ ```
188
+
101
189
  よろしくお願いします。

1

誤字

2020/09/13 09:08

投稿

yamay
yamay

スコア5

title CHANGED
File without changes
body CHANGED
@@ -73,7 +73,7 @@
73
73
  end
74
74
  ```
75
75
  `nginx`
76
- ```html
76
+ ```
77
77
  error_log /var/www/rails/sampleapp/log/nginx.error.log;
78
78
  access_log /var/www/rails/sampleapp/log/nginx.access.log;
79
79
  client_max_body_size 2G;