teratail header banner
teratail header banner
質問するログイン新規登録

質問編集履歴

2

production\.rbを追記しました

2017/05/22 23:51

投稿

yamady
yamady

スコア176

title CHANGED
File without changes
body CHANGED
@@ -76,4 +76,93 @@
76
76
 
77
77
  $heroku pg:reset DATABASE
78
78
 
79
- 上記2つもうまくいかずです。ローカル環境は動いているのに。。
79
+ 上記2つもうまくいかずです。ローカル環境は動いているのに。。
80
+
81
+ ```Ruby
82
+ Rails.application.configure do
83
+ # Settings specified here will take precedence over those in config/application.rb.
84
+
85
+ # Code is not reloaded between requests.
86
+ config.cache_classes = true
87
+
88
+ # Eager load code on boot. This eager loads most of Rails and
89
+ # your application in memory, allowing both threaded web servers
90
+ # and those relying on copy on write to perform better.
91
+ # Rake tasks automatically ignore this option for performance.
92
+ config.eager_load = true
93
+
94
+ # Full error reports are disabled and caching is turned on.
95
+ config.consider_all_requests_local = false
96
+ config.action_controller.perform_caching = true
97
+
98
+ # Disable serving static files from the `/public` folder by default since
99
+ # Apache or NGINX already handles this.
100
+ config.public_file_server.enabled = ENV['RAILS_SERVE_STATIC_FILES'].present?
101
+
102
+ # Compress JavaScripts and CSS.
103
+ config.assets.js_compressor = :uglifier
104
+ # config.assets.css_compressor = :sass
105
+
106
+ # Do not fallback to assets pipeline if a precompiled asset is missed.
107
+ config.assets.compile = false
108
+
109
+ # `config.assets.precompile` and `config.assets.version` have moved to config/initializers/assets.rb
110
+
111
+ # Enable serving of images, stylesheets, and JavaScripts from an asset server.
112
+ # config.action_controller.asset_host = 'http://assets.example.com'
113
+
114
+ # Specifies the header that your server uses for sending files.
115
+ # config.action_dispatch.x_sendfile_header = 'X-Sendfile' # for Apache
116
+ # config.action_dispatch.x_sendfile_header = 'X-Accel-Redirect' # for NGINX
117
+
118
+ # Mount Action Cable outside main process or domain
119
+ # config.action_cable.mount_path = nil
120
+ # config.action_cable.url = 'wss://example.com/cable'
121
+ # config.action_cable.allowed_request_origins = [ 'http://example.com', /http:\/\/example.*/ ]
122
+
123
+ # Force all access to the app over SSL, use Strict-Transport-Security, and use secure cookies.
124
+ config.force_ssl = false
125
+
126
+ # Use the lowest log level to ensure availability of diagnostic information
127
+ # when problems arise.
128
+ config.log_level = :debug
129
+
130
+ # Prepend all log lines with the following tags.
131
+ config.log_tags = [ :request_id ]
132
+
133
+ # Use a different cache store in production.
134
+ # config.cache_store = :mem_cache_store
135
+
136
+ # Use a real queuing backend for Active Job (and separate queues per environment)
137
+ # config.active_job.queue_adapter = :resque
138
+ # config.active_job.queue_name_prefix = "spacehacker_app_#{Rails.env}"
139
+ config.action_mailer.perform_caching = false
140
+
141
+ # Ignore bad email addresses and do not raise email delivery errors.
142
+ # Set this to true and configure the email server for immediate delivery to raise delivery errors.
143
+
144
+ # Enable locale fallbacks for I18n (makes lookups for any locale fall back to
145
+ # the I18n.default_locale when a translation cannot be found).
146
+ config.i18n.fallbacks = true
147
+
148
+ # Send deprecation notices to registered listeners.
149
+ config.active_support.deprecation = :notify
150
+
151
+ # Use default logging formatter so that PID and timestamp are not suppressed.
152
+ config.log_formatter = ::Logger::Formatter.new
153
+
154
+ # Use a different logger for distributed setups.
155
+ # require 'syslog/logger'
156
+ # config.logger = ActiveSupport::TaggedLogging.new(Syslog::Logger.new 'app-name')
157
+
158
+ if ENV["RAILS_LOG_TO_STDOUT"].present?
159
+ logger = ActiveSupport::Logger.new(STDOUT)
160
+ logger.formatter = config.log_formatter
161
+ config.logger = ActiveSupport::TaggedLogging.new(logger)
162
+ end
163
+
164
+ # Do not dump schema after migrations.
165
+ config.active_record.dump_schema_after_migration = false
166
+ end
167
+
168
+ ```

1

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

2017/05/22 23:51

投稿

yamady
yamady

スコア176

title CHANGED
File without changes
body CHANGED
@@ -65,4 +65,15 @@
65
65
  2017-05-22T16:24:09.995355+00:00 heroku[run.1793]: State changed from starting to up
66
66
  2017-05-22T16:24:19.611596+00:00 heroku[run.1793]: State changed from up to complete
67
67
  2017-05-22T16:24:19.597841+00:00 heroku[run.1793]: Process exited with status 1
68
- ```
68
+ ```
69
+
70
+ ###追記
71
+
72
+ $heroku run rake db:migrate
73
+
74
+ FATAL: permission denied for database "postgres"
75
+ DETAIL: User does not have CONNECT privilege.
76
+
77
+ $heroku pg:reset DATABASE
78
+
79
+ 上記2つもうまくいかずです。ローカル環境は動いているのに。。