質問編集履歴
5
ファイルを追加
title
CHANGED
File without changes
|
body
CHANGED
@@ -101,6 +101,103 @@
|
|
101
101
|
});
|
102
102
|
|
103
103
|
```
|
104
|
+
```
|
105
|
+
Rails.application.configure do
|
106
|
+
# Settings specified here will take precedence over those in config/application.rb.
|
107
|
+
|
108
|
+
# Code is not reloaded between requests.
|
109
|
+
config.cache_classes = true
|
110
|
+
|
111
|
+
# Eager load code on boot. This eager loads most of Rails and
|
112
|
+
# your application in memory, allowing both threaded web servers
|
113
|
+
# and those relying on copy on write to perform better.
|
114
|
+
# Rake tasks automatically ignore this option for performance.
|
115
|
+
config.eager_load = true
|
116
|
+
|
117
|
+
# Full error reports are disabled and caching is turned on.
|
118
|
+
config.consider_all_requests_local = false
|
119
|
+
config.action_controller.perform_caching = true
|
120
|
+
|
121
|
+
# Ensures that a master key has been made available in either ENV["RAILS_MASTER_KEY"]
|
122
|
+
# or in config/master.key. This key is used to decrypt credentials (and other encrypted files).
|
123
|
+
# config.require_master_key = true
|
124
|
+
|
125
|
+
# Disable serving static files from the `/public` folder by default since
|
126
|
+
# Apache or NGINX already handles this.
|
127
|
+
config.public_file_server.enabled = ENV['RAILS_SERVE_STATIC_FILES'].present?
|
128
|
+
|
129
|
+
# Compress JavaScripts and CSS.
|
130
|
+
config.assets.js_compressor = Uglifier.new(harmony: true)
|
131
|
+
# config.assets.css_compressor = :sass
|
132
|
+
|
133
|
+
# Do not fallback to assets pipeline if a precompiled asset is missed.
|
134
|
+
config.assets.compile = true
|
135
|
+
|
136
|
+
# `config.assets.precompile` and `config.assets.version` have moved to config/initializers/assets.rb
|
137
|
+
|
138
|
+
# Enable serving of images, stylesheets, and JavaScripts from an asset server.
|
139
|
+
# config.action_controller.asset_host = 'http://assets.example.com'
|
140
|
+
|
141
|
+
# Specifies the header that your server uses for sending files.
|
142
|
+
# config.action_dispatch.x_sendfile_header = 'X-Sendfile' # for Apache
|
143
|
+
# config.action_dispatch.x_sendfile_header = 'X-Accel-Redirect' # for NGINX
|
144
|
+
|
145
|
+
# Store uploaded files on the local file system (see config/storage.yml for options)
|
146
|
+
config.active_storage.service = :local
|
147
|
+
|
148
|
+
# Mount Action Cable outside main process or domain
|
149
|
+
# config.action_cable.mount_path = nil
|
150
|
+
# config.action_cable.url = 'wss://example.com/cable'
|
151
|
+
# config.action_cable.allowed_request_origins = [ 'http://example.com', /http://example.*/ ]
|
152
|
+
|
153
|
+
# Force all access to the app over SSL, use Strict-Transport-Security, and use secure cookies.
|
154
|
+
# config.force_ssl = true
|
155
|
+
|
156
|
+
# Use the lowest log level to ensure availability of diagnostic information
|
157
|
+
# when problems arise.
|
158
|
+
config.log_level = :debug
|
159
|
+
|
160
|
+
# Prepend all log lines with the following tags.
|
161
|
+
config.log_tags = [ :request_id ]
|
162
|
+
|
163
|
+
# Use a different cache store in production.
|
164
|
+
# config.cache_store = :mem_cache_store
|
165
|
+
|
166
|
+
# Use a real queuing backend for Active Job (and separate queues per environment)
|
167
|
+
# config.active_job.queue_adapter = :resque
|
168
|
+
# config.active_job.queue_name_prefix = "picsta_#{Rails.env}"
|
169
|
+
|
170
|
+
config.action_mailer.perform_caching = false
|
171
|
+
|
172
|
+
# Ignore bad email addresses and do not raise email delivery errors.
|
173
|
+
# Set this to true and configure the email server for immediate delivery to raise delivery errors.
|
174
|
+
# config.action_mailer.raise_delivery_errors = false
|
175
|
+
|
176
|
+
# Enable locale fallbacks for I18n (makes lookups for any locale fall back to
|
177
|
+
# the I18n.default_locale when a translation cannot be found).
|
178
|
+
config.i18n.fallbacks = true
|
179
|
+
|
180
|
+
# Send deprecation notices to registered listeners.
|
181
|
+
config.active_support.deprecation = :notify
|
182
|
+
|
183
|
+
# Use default logging formatter so that PID and timestamp are not suppressed.
|
184
|
+
config.log_formatter = ::Logger::Formatter.new
|
185
|
+
|
186
|
+
# Use a different logger for distributed setups.
|
187
|
+
# require 'syslog/logger'
|
188
|
+
# config.logger = ActiveSupport::TaggedLogging.new(Syslog::Logger.new 'app-name')
|
189
|
+
|
190
|
+
if ENV["RAILS_LOG_TO_STDOUT"].present?
|
191
|
+
logger = ActiveSupport::Logger.new(STDOUT)
|
192
|
+
logger.formatter = config.log_formatter
|
193
|
+
config.logger = ActiveSupport::TaggedLogging.new(logger)
|
194
|
+
end
|
195
|
+
|
196
|
+
# Do not dump schema after migrations.
|
197
|
+
config.active_record.dump_schema_after_migration = false
|
198
|
+
end
|
199
|
+
|
200
|
+
```
|
104
201
|
### 試したこと
|
105
202
|
config/environments/production.rb を以下に変更
|
106
203
|
```
|
4
誤字修正
title
CHANGED
File without changes
|
body
CHANGED
@@ -109,7 +109,7 @@
|
|
109
109
|
+ config.assets.js_compressor = Uglifier.new(harmony: true)
|
110
110
|
```
|
111
111
|
```
|
112
|
-
-
|
112
|
+
- config.assets.compile = false
|
113
113
|
|
114
114
|
+ config.assets.compile = true
|
115
115
|
|
3
試したことを追加
title
CHANGED
File without changes
|
body
CHANGED
@@ -104,7 +104,13 @@
|
|
104
104
|
### 試したこと
|
105
105
|
config/environments/production.rb を以下に変更
|
106
106
|
```
|
107
|
-
|
107
|
+
- config.assets.js_compressor = :uglifier
|
108
|
-
|
108
|
+
|
109
|
-
|
109
|
+
+ config.assets.js_compressor = Uglifier.new(harmony: true)
|
110
|
+
```
|
111
|
+
```
|
112
|
+
- onfig.assets.compile = false
|
113
|
+
|
114
|
+
+ config.assets.compile = true
|
115
|
+
|
110
116
|
```
|
2
エラーログを追加しました。
title
CHANGED
File without changes
|
body
CHANGED
@@ -43,6 +43,21 @@
|
|
43
43
|
(See full trace by running task with --trace)
|
44
44
|
|
45
45
|
```
|
46
|
+
```
|
47
|
+
[ec2-user@ip-172-31-42-166 picsta]$ tail -f log/production.log
|
48
|
+
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.):
|
49
|
+
F, [2020-07-20T05:53:00.127195 #32450] FATAL -- : [54eadd09-9f36-4207-8e87-cae6d91be591] 5: %title Picsta
|
50
|
+
[54eadd09-9f36-4207-8e87-cae6d91be591] 6: = csrf_meta_tags
|
51
|
+
[54eadd09-9f36-4207-8e87-cae6d91be591] 7: = csp_meta_tag
|
52
|
+
[54eadd09-9f36-4207-8e87-cae6d91be591] 8: = stylesheet_link_tag 'application', media: 'all', 'data-turbolinks-track': 'reload'
|
53
|
+
[54eadd09-9f36-4207-8e87-cae6d91be591] 9: = javascript_include_tag 'application'
|
54
|
+
[54eadd09-9f36-4207-8e87-cae6d91be591] 10: %body
|
55
|
+
[54eadd09-9f36-4207-8e87-cae6d91be591] 11: = render 'layouts/notifications'
|
56
|
+
F, [2020-07-20T05:53:00.127229 #32450] FATAL -- : [54eadd09-9f36-4207-8e87-cae6d91be591]
|
57
|
+
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'
|
58
|
+
|
59
|
+
```
|
60
|
+
|
46
61
|
### 該当のソースコード
|
47
62
|
上記のエラーが出ているJSファイルの箇所の部分↓
|
48
63
|
※ローカル環境ではエラーは出ていません。
|
1
誤字修正
title
CHANGED
File without changes
|
body
CHANGED
@@ -92,11 +92,4 @@
|
|
92
92
|
前 config.assets.js_compressor = :uglifier
|
93
93
|
↓
|
94
94
|
後 config.assets.js_compressor = Uglifier.new(harmony: true)
|
95
|
-
```
|
95
|
+
```
|
96
|
-
|
97
|
-
変更した後
|
98
|
-
|
99
|
-
|
100
|
-
### 補足情報(FW/ツールのバージョンなど)
|
101
|
-
|
102
|
-
ここにより詳細な情報を記載してください。
|