質問編集履歴

2

production.rbのcode追記

2019/12/21 11:53

投稿

marco
marco

スコア33

test CHANGED
File without changes
test CHANGED
@@ -123,3 +123,203 @@
123
123
  回答者様に対して別の人がコメントや、質問に対する回答でないコメントなどは
124
124
 
125
125
  ご遠慮願います。
126
+
127
+
128
+
129
+ 下記、追記しました。
130
+
131
+
132
+
133
+ ```production
134
+
135
+ Rails.application.configure do
136
+
137
+ # Settings specified here will take precedence over those in config/application.rb.
138
+
139
+
140
+
141
+ # Code is not reloaded between requests.
142
+
143
+ config.cache_classes = true
144
+
145
+
146
+
147
+ # Eager load code on boot. This eager loads most of Rails and
148
+
149
+ # your application in memory, allowing both threaded web servers
150
+
151
+ # and those relying on copy on write to perform better.
152
+
153
+ # Rake tasks automatically ignore this option for performance.
154
+
155
+ config.eager_load = true
156
+
157
+
158
+
159
+ # Full error reports are disabled and caching is turned on.
160
+
161
+ config.consider_all_requests_local = false
162
+
163
+ config.action_controller.perform_caching = true
164
+
165
+
166
+
167
+ # Ensures that a master key has been made available in either ENV["RAILS_MASTER_KEY"]
168
+
169
+ # or in config/master.key. This key is used to decrypt credentials (and other encrypted files).
170
+
171
+ # config.require_master_key = true
172
+
173
+
174
+
175
+ # Disable serving static files from the `/public` folder by default since
176
+
177
+ # Apache or NGINX already handles this.
178
+
179
+ config.public_file_server.enabled = ENV['RAILS_SERVE_STATIC_FILES'].present?
180
+
181
+
182
+
183
+ # Compress JavaScripts and CSS.
184
+
185
+ config.assets.js_compressor = :uglifier
186
+
187
+ # config.assets.css_compressor = :sass
188
+
189
+
190
+
191
+ # Do not fallback to assets pipeline if a precompiled asset is missed.
192
+
193
+ config.assets.compile = false
194
+
195
+
196
+
197
+ # `config.assets.precompile` and `config.assets.version` have moved to config/initializers/assets.rb
198
+
199
+
200
+
201
+ # Enable serving of images, stylesheets, and JavaScripts from an asset server.
202
+
203
+ # config.action_controller.asset_host = 'http://assets.example.com'
204
+
205
+
206
+
207
+ # Specifies the header that your server uses for sending files.
208
+
209
+ # config.action_dispatch.x_sendfile_header = 'X-Sendfile' # for Apache
210
+
211
+ # config.action_dispatch.x_sendfile_header = 'X-Accel-Redirect' # for NGINX
212
+
213
+
214
+
215
+ # Store uploaded files on the local file system (see config/storage.yml for options)
216
+
217
+ config.active_storage.service = :local
218
+
219
+
220
+
221
+ # Mount Action Cable outside main process or domain
222
+
223
+ # config.action_cable.mount_path = nil
224
+
225
+ # config.action_cable.url = 'wss://example.com/cable'
226
+
227
+ # config.action_cable.allowed_request_origins = [ 'http://example.com', /http://example.*/ ]
228
+
229
+
230
+
231
+ # Force all access to the app over SSL, use Strict-Transport-Security, and use secure cookies.
232
+
233
+ # config.force_ssl = true
234
+
235
+
236
+
237
+ # Use the lowest log level to ensure availability of diagnostic information
238
+
239
+ # when problems arise.
240
+
241
+ config.log_level = :debug
242
+
243
+
244
+
245
+ # Prepend all log lines with the following tags.
246
+
247
+ config.log_tags = [ :request_id ]
248
+
249
+
250
+
251
+ # Use a different cache store in production.
252
+
253
+ # config.cache_store = :mem_cache_store
254
+
255
+
256
+
257
+ # Use a real queuing backend for Active Job (and separate queues per environment)
258
+
259
+ # config.active_job.queue_adapter = :resque
260
+
261
+ # config.active_job.queue_name_prefix = "BookBook_#{Rails.env}"
262
+
263
+
264
+
265
+ config.action_mailer.perform_caching = false
266
+
267
+
268
+
269
+ # Ignore bad email addresses and do not raise email delivery errors.
270
+
271
+ # Set this to true and configure the email server for immediate delivery to raise delivery errors.
272
+
273
+ # config.action_mailer.raise_delivery_errors = false
274
+
275
+
276
+
277
+ # Enable locale fallbacks for I18n (makes lookups for any locale fall back to
278
+
279
+ # the I18n.default_locale when a translation cannot be found).
280
+
281
+ config.i18n.fallbacks = true
282
+
283
+
284
+
285
+ # Send deprecation notices to registered listeners.
286
+
287
+ config.active_support.deprecation = :notify
288
+
289
+
290
+
291
+ # Use default logging formatter so that PID and timestamp are not suppressed.
292
+
293
+ config.log_formatter = ::Logger::Formatter.new
294
+
295
+
296
+
297
+ # Use a different logger for distributed setups.
298
+
299
+ # require 'syslog/logger'
300
+
301
+ # config.logger = ActiveSupport::TaggedLogging.new(Syslog::Logger.new 'app-name')
302
+
303
+
304
+
305
+ if ENV["RAILS_LOG_TO_STDOUT"].present?
306
+
307
+ logger = ActiveSupport::Logger.new(STDOUT)
308
+
309
+ logger.formatter = config.log_formatter
310
+
311
+ config.logger = ActiveSupport::TaggedLogging.new(logger)
312
+
313
+ end
314
+
315
+
316
+
317
+ # Do not dump schema after migrations.
318
+
319
+ config.active_record.dump_schema_after_migration = false
320
+
321
+ end
322
+
323
+
324
+
325
+ ```

1

誤字を修正しました

2019/12/21 11:53

投稿

marco
marco

スコア33

test CHANGED
File without changes
test CHANGED
@@ -120,8 +120,6 @@
120
120
 
121
121
 
122
122
 
123
- 回答者様に対して別の人がコメントするややこしくなるので、
123
+ 回答者様に対して別の人がコメントや、質問に対する回答でないコメントなど
124
124
 
125
125
  ご遠慮願います。
126
-
127
- 質問に対する回答でないコメントなどは通報させてもらいます。