質問編集履歴

1

production\.rb追記

2017/09/15 14:39

投稿

NishidaRyu416_
NishidaRyu416_

スコア113

test CHANGED
File without changes
test CHANGED
@@ -36,4 +36,192 @@
36
36
 
37
37
  ```
38
38
 
39
+ production
40
+
41
+ ```
42
+
43
+ Rails.application.configure do
44
+
45
+ # Settings specified here will take precedence over those in config/application.rb.
46
+
47
+
48
+
49
+ # Code is not reloaded between requests.
50
+
51
+ config.cache_classes = true
52
+
53
+
54
+
55
+ # Eager load code on boot. This eager loads most of Rails and
56
+
57
+ # your application in memory, allowing both threaded web servers
58
+
59
+ # and those relying on copy on write to perform better.
60
+
61
+ # Rake tasks automatically ignore this option for performance.
62
+
63
+ config.eager_load = true
64
+
65
+
66
+
67
+ # Full error reports are disabled and caching is turned on.
68
+
69
+ config.consider_all_requests_local = false
70
+
71
+ config.action_controller.perform_caching = true
72
+
73
+
74
+
75
+ # Attempt to read encrypted secrets from `config/secrets.yml.enc`.
76
+
77
+ # Requires an encryption key in `ENV["RAILS_MASTER_KEY"]` or
78
+
79
+ # `config/secrets.yml.key`.
80
+
81
+ config.read_encrypted_secrets = true
82
+
83
+
84
+
85
+ # Disable serving static files from the `/public` folder by default since
86
+
87
+ # Apache or NGINX already handles this.
88
+
89
+ config.public_file_server.enabled = true
90
+
91
+
92
+
93
+ # Compress JavaScripts and CSS.
94
+
95
+ config.assets.js_compressor = :uglifier
96
+
97
+ # config.assets.css_compressor = :sass
98
+
99
+
100
+
101
+ # Do not fallback to assets pipeline if a precompiled asset is missed.
102
+
103
+ config.assets.compile = false
104
+
105
+
106
+
107
+ # `config.assets.precompile` and `config.assets.version` have moved to config/initializers/assets.rb
108
+
109
+
110
+
111
+ # Enable serving of images, stylesheets, and JavaScripts from an asset server.
112
+
113
+ # config.action_controller.asset_host = 'http://assets.example.com'
114
+
115
+
116
+
117
+ # Specifies the header that your server uses for sending files.
118
+
119
+ # config.action_dispatch.x_sendfile_header = 'X-Sendfile' # for Apache
120
+
121
+ # config.action_dispatch.x_sendfile_header = 'X-Accel-Redirect' # for NGINX
122
+
123
+
124
+
125
+ # Mount Action Cable outside main process or domain
126
+
127
+ # config.action_cable.mount_path = nil
128
+
129
+ # config.action_cable.url = 'wss://example.com/cable'
130
+
131
+ # config.action_cable.allowed_request_origins = [ 'http://example.com', /http:\/\/example.*/ ]
132
+
133
+
134
+
135
+ # Force all access to the app over SSL, use Strict-Transport-Security, and use secure cookies.
136
+
137
+ # config.force_ssl = true
138
+
139
+
140
+
141
+ # Use the lowest log level to ensure availability of diagnostic information
142
+
143
+ # when problems arise.
144
+
145
+ config.log_level = :debug
146
+
147
+
148
+
149
+ # Prepend all log lines with the following tags.
150
+
151
+ config.log_tags = [ :request_id ]
152
+
153
+
154
+
155
+ # Use a different cache store in production.
156
+
157
+ # config.cache_store = :mem_cache_store
158
+
159
+
160
+
161
+ # Use a real queuing backend for Active Job (and separate queues per environment)
162
+
163
+ # config.active_job.queue_adapter = :resque
164
+
165
+ # config.active_job.queue_name_prefix = "gbucks_#{Rails.env}"
166
+
167
+ config.action_mailer.perform_caching = false
168
+
169
+
170
+
171
+ # Ignore bad email addresses and do not raise email delivery errors.
172
+
173
+ # Set this to true and configure the email server for immediate delivery to raise delivery errors.
174
+
175
+ # config.action_mailer.raise_delivery_errors = false
176
+
177
+
178
+
179
+ # Enable locale fallbacks for I18n (makes lookups for any locale fall back to
180
+
181
+ # the I18n.default_locale when a translation cannot be found).
182
+
183
+ config.i18n.fallbacks = true
184
+
185
+
186
+
187
+ # Send deprecation notices to registered listeners.
188
+
189
+ config.active_support.deprecation = :notify
190
+
191
+
192
+
193
+ # Use default logging formatter so that PID and timestamp are not suppressed.
194
+
195
+ config.log_formatter = ::Logger::Formatter.new
196
+
197
+ # Use a different logger for distributed setups.
198
+
199
+ # require 'syslog/logger'
200
+
201
+ # config.logger = ActiveSupport::TaggedLogging.new(Syslog::Logger.new 'app-name')
202
+
203
+
204
+
205
+ if ENV["RAILS_LOG_TO_STDOUT"].present?
206
+
207
+ logger = ActiveSupport::Logger.new(STDOUT)
208
+
209
+ logger.formatter = config.log_formatter
210
+
211
+ config.logger = ActiveSupport::TaggedLogging.new(logger)
212
+
213
+ end
214
+
215
+
216
+
217
+ # Do not dump schema after migrations.
218
+
219
+ config.active_record.dump_schema_after_migration = false
220
+
221
+ end
222
+
223
+
224
+
225
+ ```
226
+
39
227
  開発環境ではしっかりと動いていました.