質問編集履歴

2

production\.rbを追記しました

2017/05/22 23:51

投稿

yamady
yamady

スコア176

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

1

追記で試したことを記載しました

2017/05/22 23:51

投稿

yamady
yamady

スコア176

test CHANGED
File without changes
test CHANGED
@@ -133,3 +133,25 @@
133
133
  2017-05-22T16:24:19.597841+00:00 heroku[run.1793]: Process exited with status 1
134
134
 
135
135
  ```
136
+
137
+
138
+
139
+ ###追記
140
+
141
+
142
+
143
+ $heroku run rake db:migrate
144
+
145
+
146
+
147
+ FATAL: permission denied for database "postgres"
148
+
149
+ DETAIL: User does not have CONNECT privilege.
150
+
151
+
152
+
153
+ $heroku pg:reset DATABASE
154
+
155
+
156
+
157
+ 上記2つもうまくいかずです。ローカル環境は動いているのに。。