質問編集履歴

5

ファイルを追加

2020/07/21 01:37

投稿

mako19
mako19

スコア6

test CHANGED
File without changes
test CHANGED
@@ -204,6 +204,200 @@
204
204
 
205
205
  ```
206
206
 
207
+ ```
208
+
209
+ Rails.application.configure do
210
+
211
+ # Settings specified here will take precedence over those in config/application.rb.
212
+
213
+
214
+
215
+ # Code is not reloaded between requests.
216
+
217
+ config.cache_classes = true
218
+
219
+
220
+
221
+ # Eager load code on boot. This eager loads most of Rails and
222
+
223
+ # your application in memory, allowing both threaded web servers
224
+
225
+ # and those relying on copy on write to perform better.
226
+
227
+ # Rake tasks automatically ignore this option for performance.
228
+
229
+ config.eager_load = true
230
+
231
+
232
+
233
+ # Full error reports are disabled and caching is turned on.
234
+
235
+ config.consider_all_requests_local = false
236
+
237
+ config.action_controller.perform_caching = true
238
+
239
+
240
+
241
+ # Ensures that a master key has been made available in either ENV["RAILS_MASTER_KEY"]
242
+
243
+ # or in config/master.key. This key is used to decrypt credentials (and other encrypted files).
244
+
245
+ # config.require_master_key = true
246
+
247
+
248
+
249
+ # Disable serving static files from the `/public` folder by default since
250
+
251
+ # Apache or NGINX already handles this.
252
+
253
+ config.public_file_server.enabled = ENV['RAILS_SERVE_STATIC_FILES'].present?
254
+
255
+
256
+
257
+ # Compress JavaScripts and CSS.
258
+
259
+ config.assets.js_compressor = Uglifier.new(harmony: true)
260
+
261
+ # config.assets.css_compressor = :sass
262
+
263
+
264
+
265
+ # Do not fallback to assets pipeline if a precompiled asset is missed.
266
+
267
+ config.assets.compile = true
268
+
269
+
270
+
271
+ # `config.assets.precompile` and `config.assets.version` have moved to config/initializers/assets.rb
272
+
273
+
274
+
275
+ # Enable serving of images, stylesheets, and JavaScripts from an asset server.
276
+
277
+ # config.action_controller.asset_host = 'http://assets.example.com'
278
+
279
+
280
+
281
+ # Specifies the header that your server uses for sending files.
282
+
283
+ # config.action_dispatch.x_sendfile_header = 'X-Sendfile' # for Apache
284
+
285
+ # config.action_dispatch.x_sendfile_header = 'X-Accel-Redirect' # for NGINX
286
+
287
+
288
+
289
+ # Store uploaded files on the local file system (see config/storage.yml for options)
290
+
291
+ config.active_storage.service = :local
292
+
293
+
294
+
295
+ # Mount Action Cable outside main process or domain
296
+
297
+ # config.action_cable.mount_path = nil
298
+
299
+ # config.action_cable.url = 'wss://example.com/cable'
300
+
301
+ # config.action_cable.allowed_request_origins = [ 'http://example.com', /http://example.*/ ]
302
+
303
+
304
+
305
+ # Force all access to the app over SSL, use Strict-Transport-Security, and use secure cookies.
306
+
307
+ # config.force_ssl = true
308
+
309
+
310
+
311
+ # Use the lowest log level to ensure availability of diagnostic information
312
+
313
+ # when problems arise.
314
+
315
+ config.log_level = :debug
316
+
317
+
318
+
319
+ # Prepend all log lines with the following tags.
320
+
321
+ config.log_tags = [ :request_id ]
322
+
323
+
324
+
325
+ # Use a different cache store in production.
326
+
327
+ # config.cache_store = :mem_cache_store
328
+
329
+
330
+
331
+ # Use a real queuing backend for Active Job (and separate queues per environment)
332
+
333
+ # config.active_job.queue_adapter = :resque
334
+
335
+ # config.active_job.queue_name_prefix = "picsta_#{Rails.env}"
336
+
337
+
338
+
339
+ config.action_mailer.perform_caching = false
340
+
341
+
342
+
343
+ # Ignore bad email addresses and do not raise email delivery errors.
344
+
345
+ # Set this to true and configure the email server for immediate delivery to raise delivery errors.
346
+
347
+ # config.action_mailer.raise_delivery_errors = false
348
+
349
+
350
+
351
+ # Enable locale fallbacks for I18n (makes lookups for any locale fall back to
352
+
353
+ # the I18n.default_locale when a translation cannot be found).
354
+
355
+ config.i18n.fallbacks = true
356
+
357
+
358
+
359
+ # Send deprecation notices to registered listeners.
360
+
361
+ config.active_support.deprecation = :notify
362
+
363
+
364
+
365
+ # Use default logging formatter so that PID and timestamp are not suppressed.
366
+
367
+ config.log_formatter = ::Logger::Formatter.new
368
+
369
+
370
+
371
+ # Use a different logger for distributed setups.
372
+
373
+ # require 'syslog/logger'
374
+
375
+ # config.logger = ActiveSupport::TaggedLogging.new(Syslog::Logger.new 'app-name')
376
+
377
+
378
+
379
+ if ENV["RAILS_LOG_TO_STDOUT"].present?
380
+
381
+ logger = ActiveSupport::Logger.new(STDOUT)
382
+
383
+ logger.formatter = config.log_formatter
384
+
385
+ config.logger = ActiveSupport::TaggedLogging.new(logger)
386
+
387
+ end
388
+
389
+
390
+
391
+ # Do not dump schema after migrations.
392
+
393
+ config.active_record.dump_schema_after_migration = false
394
+
395
+ end
396
+
397
+
398
+
399
+ ```
400
+
207
401
  ### 試したこと
208
402
 
209
403
  config/environments/production.rb を以下に変更

4

誤字修正

2020/07/21 01:37

投稿

mako19
mako19

スコア6

test CHANGED
File without changes
test CHANGED
@@ -220,7 +220,7 @@
220
220
 
221
221
  ```
222
222
 
223
- - onfig.assets.compile = false
223
+ - config.assets.compile = false
224
224
 
225
225
 
226
226
 

3

試したことを追加

2020/07/20 06:50

投稿

mako19
mako19

スコア6

test CHANGED
File without changes
test CHANGED
@@ -210,10 +210,22 @@
210
210
 
211
211
  ```
212
212
 
213
-  config.assets.js_compressor = :uglifier
213
+ - config.assets.js_compressor = :uglifier
214
-
215
-
214
+
216
-
215
+
216
+
217
-  config.assets.js_compressor = Uglifier.new(harmony: true)
217
+ + config.assets.js_compressor = Uglifier.new(harmony: true)
218
-
218
+
219
- ```
219
+ ```
220
+
221
+ ```
222
+
223
+ - onfig.assets.compile = false
224
+
225
+
226
+
227
+ + config.assets.compile = true
228
+
229
+
230
+
231
+ ```

2

エラーログを追加しました。

2020/07/20 06:50

投稿

mako19
mako19

スコア6

test CHANGED
File without changes
test CHANGED
@@ -88,6 +88,36 @@
88
88
 
89
89
  ```
90
90
 
91
+ ```
92
+
93
+ [ec2-user@ip-172-31-42-166 picsta]$ tail -f log/production.log
94
+
95
+ F, [2020-07-20T05:53:00.127073 #32450] FATAL -- : [54eadd09-9f36-4207-8e87-cae6d91be591] ActionView::Template::Error (The asset "application.css" is not present in the asset pipeline.):
96
+
97
+ F, [2020-07-20T05:53:00.127195 #32450] FATAL -- : [54eadd09-9f36-4207-8e87-cae6d91be591] 5: %title Picsta
98
+
99
+ [54eadd09-9f36-4207-8e87-cae6d91be591] 6: = csrf_meta_tags
100
+
101
+ [54eadd09-9f36-4207-8e87-cae6d91be591] 7: = csp_meta_tag
102
+
103
+ [54eadd09-9f36-4207-8e87-cae6d91be591] 8: = stylesheet_link_tag 'application', media: 'all', 'data-turbolinks-track': 'reload'
104
+
105
+ [54eadd09-9f36-4207-8e87-cae6d91be591] 9: = javascript_include_tag 'application'
106
+
107
+ [54eadd09-9f36-4207-8e87-cae6d91be591] 10: %body
108
+
109
+ [54eadd09-9f36-4207-8e87-cae6d91be591] 11: = render 'layouts/notifications'
110
+
111
+ F, [2020-07-20T05:53:00.127229 #32450] FATAL -- : [54eadd09-9f36-4207-8e87-cae6d91be591]
112
+
113
+ F, [2020-07-20T05:53:00.127253 #32450] FATAL -- : [54eadd09-9f36-4207-8e87-cae6d91be591] app/views/layouts/application.html.haml:8:in `_app_views_layouts_application_html_haml___269755376428411494_39720900'
114
+
115
+
116
+
117
+ ```
118
+
119
+
120
+
91
121
  ### 該当のソースコード
92
122
 
93
123
  上記のエラーが出ているJSファイルの箇所の部分↓

1

誤字修正

2020/07/20 06:48

投稿

mako19
mako19

スコア6

test CHANGED
File without changes
test CHANGED
@@ -187,17 +187,3 @@
187
187
  後 config.assets.js_compressor = Uglifier.new(harmony: true)
188
188
 
189
189
  ```
190
-
191
-
192
-
193
- 変更した後
194
-
195
-
196
-
197
-
198
-
199
- ### 補足情報(FW/ツールのバージョンなど)
200
-
201
-
202
-
203
- ここにより詳細な情報を記載してください。