質問編集履歴

4

文字数制限のためGemfileの方を画像にしました。申し訳ありません。

2021/09/08 12:58

投稿

退会済みユーザー
test CHANGED
File without changes
test CHANGED
@@ -180,6 +180,12 @@
180
180
 
181
181
 
182
182
 
183
+ ![イメージ説明](16d25b61ccbf7cc848596c1ea6158ff8.png)
184
+
185
+ ![イメージ説明](fee806aa973cf020559f39333d16d63a.png)
186
+
187
+
188
+
183
189
  devise.rb
184
190
 
185
191
  ```

3

devise.rbを追加しました。文字数制限のためコメントアウトしてあるところは載せておりません。

2021/09/08 12:58

投稿

退会済みユーザー
test CHANGED
File without changes
test CHANGED
@@ -178,168 +178,62 @@
178
178
 
179
179
  ```
180
180
 
181
- Gemfile
182
-
183
- ```
184
-
185
- source 'https://rubygems.org'
186
-
187
- git_source(:github) { |repo| "https://github.com/#{repo}.git" }
188
-
189
-
190
-
191
- ruby '3.0.2'
192
-
193
-
194
-
195
- # Bundle edge Rails instead: gem 'rails', github: 'rails/rails', branch: 'main'
196
-
197
- gem 'rails', '~> 6.1.3', '>= 6.1.3.2'
198
-
199
- # Use sqlite3 as the database for Active Record
200
-
201
- #gem 'sqlite3', '~> 1.4' ##デプロイでここコメントアウトした
202
-
203
- # Use Puma as the app server
204
-
205
- gem 'puma', '~> 5.0'
206
-
207
- # Use SCSS for stylesheets
208
-
209
- gem 'sass-rails', '>= 6'
210
-
211
- # Transpile app-like JavaScript. Read more: https://github.com/rails/webpacker
212
-
213
- gem 'webpacker', '~> 5.0'
214
-
215
- # Turbolinks makes navigating your web application faster. Read more: https://github.com/turbolinks/turbolinks
216
-
217
- gem 'turbolinks', '~> 5'
218
-
219
- # Build JSON APIs with ease. Read more: https://github.com/rails/jbuilder
220
-
221
- gem 'jbuilder', '~> 2.7'
222
-
223
- # Use Redis adapter to run Action Cable in production
224
-
225
- # gem 'redis', '~> 4.0'
226
-
227
- # Use Active Model has_secure_password
228
-
229
- # gem 'bcrypt', '~> 3.1.7'
230
-
231
-
232
-
233
- # Use Active Storage variant
234
-
235
- # gem 'image_processing', '~> 1.2'
236
-
237
-
238
-
239
- # Reduces boot times through caching; required in config/boot.rb
240
-
241
- gem 'bootsnap', '>= 1.4.4', require: false
242
-
243
-
244
-
245
- group :development, :test do
246
-
247
- # Call 'byebug' anywhere in the code to stop execution and get a debugger console
248
-
249
- gem 'byebug', platforms: [:mri, :mingw, :x64_mingw]
250
-
251
- gem 'sqlite3' ##デプロイでここ追加した
181
+
182
+
183
+ devise.rb
184
+
185
+ ```
186
+
187
+ Devise.setup do |config|
188
+
189
+ config.mailer_sender = Settings.gmail[:user_name]
190
+
191
+ config.mailer_sender = '"Aiaru" <inf@aiaru.com>'
192
+
193
+
194
+
195
+ require 'devise/orm/active_record'
196
+
197
+
198
+
199
+ config.case_insensitive_keys = [:email]
200
+
201
+ config.strip_whitespace_keys = [:email]
202
+
203
+
204
+
205
+ config.skip_session_storage = [:http_auth]
206
+
207
+
208
+
209
+ config.stretches = Rails.env.test? ? 1 : 12
210
+
211
+
212
+
213
+ config.reconfirmable = true
214
+
215
+ config.expire_all_remember_me_on_sign_out = true
216
+
217
+
218
+
219
+ config.password_length = 6..128
220
+
221
+ config.email_regexp = /\A[^@\s]+@[^@\s]+\z/
222
+
223
+
224
+
225
+ config.reset_password_within = 6.hours
226
+
227
+
228
+
229
+ config.scoped_views = true
230
+
231
+ config.sign_out_via = :delete
232
+
233
+
252
234
 
253
235
  end
254
236
 
255
-
256
-
257
- group :development do
258
-
259
- # Access an interactive console on exception pages or by calling 'console' anywhere in the code.
260
-
261
- gem 'web-console', '>= 4.1.0'
262
-
263
- # Display performance information such as SQL time and flame graphs for each request in your browser.
264
-
265
- # Can be configured to work on production as well see: https://github.com/MiniProfiler/rack-mini-profiler/blob/master/README.md
266
-
267
- gem 'rack-mini-profiler', '~> 2.0'
268
-
269
- gem 'listen', '~> 3.3'
270
-
271
- # Spring speeds up development by keeping your application running in the background. Read more: https://github.com/rails/spring
272
-
273
- gem 'spring'
274
-
275
- end
276
-
277
-
278
-
279
- group :test do
280
-
281
- # Adds support for Capybara system testing and selenium driver
282
-
283
- gem 'capybara', '>= 3.26'
284
-
285
- gem 'selenium-webdriver'
286
-
287
- # Easy installation and use of web drivers to run system tests with browsers
288
-
289
- gem 'webdrivers'
290
-
291
- end
292
-
293
-
294
-
295
- # Windows does not include zoneinfo files, so bundle the tzinfo-data gem
296
-
297
- gem 'tzinfo-data', platforms: [:mingw, :mswin, :x64_mingw, :jruby]
298
-
299
-
300
-
301
- gem 'devise'
302
-
303
-
304
-
305
- gem 'config'
306
-
307
-
308
-
309
- gem "jquery-rails"
310
-
311
-
312
-
313
- gem 'carrierwave'
314
-
315
-
316
-
317
- gem 'pry-rails'
318
-
319
-
320
-
321
- gem 'fog-aws'
322
-
323
-
324
-
325
- gem 'dotenv-rails'
326
-
327
-
328
-
329
- gem 'rufo'
330
-
331
-
332
-
333
- ##以下デプロイのために追加
334
-
335
-
336
-
337
- group :production do
338
-
339
- gem 'pg'
340
-
341
- end
342
-
343
237
  ```
344
238
 
345
239
  ### 試したこと

2

画像から文に修正しました

2021/09/08 12:55

投稿

退会済みユーザー
test CHANGED
File without changes
test CHANGED
@@ -40,17 +40,307 @@
40
40
 
41
41
  エラーメッセージ
42
42
 
43
+ ```
44
+
45
+ remote: Bundle completed (145.94s)
46
+
47
+ remote: Cleaning up the bundler cache.
48
+
49
+ remote: Removing bundler (2.2.21)
50
+
51
+ remote: -----> Installing node-v12.16.2-linux-x64
52
+
53
+ remote: -----> Installing yarn-v1.22.4
54
+
55
+ remote: -----> Detecting rake tasks
56
+
57
+ remote: -----> Preparing app for Rails asset pipeline
58
+
43
- ![イメージ説明](ad0a49c7835c272417eb52e9f50c39d6.png)
59
+ remote: Running: rake assets:precompile
60
+
44
-
61
+ remote: rake aborted!
62
+
45
-
63
+ remote: NoMethodError: undefined method `[]' for nil:NilClass
64
+
65
+ remote: /tmp/build_d54fb60d/config/initializers/devise.rb:27:in `block in <main>'
66
+
67
+ remote: /tmp/build_d54fb60d/vendor/bundle/ruby/3.0.0/gems/devise-4.8.0/lib/devise.rb:307:in `setup'
68
+
69
+ remote: /tmp/build_d54fb60d/config/initializers/devise.rb:11:in `<main>'
70
+
71
+ remote: /tmp/build_d54fb60d/vendor/bundle/ruby/3.0.0/gems/bootsnap-1.8.1/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:60:in `load'
72
+
73
+ remote: /tmp/build_d54fb60d/vendor/bundle/ruby/3.0.0/gems/bootsnap-1.8.1/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:60:in `load'
74
+
75
+ remote: /tmp/build_d54fb60d/vendor/bundle/ruby/3.0.0/gems/activesupport-6.1.4.1/lib/active_support/dependencies.rb:326:in `block in load'
76
+
77
+ remote: /tmp/build_d54fb60d/vendor/bundle/ruby/3.0.0/gems/activesupport-6.1.4.1/lib/active_support/dependencies.rb:299:in `load_dependency'
78
+
79
+ remote: /tmp/build_d54fb60d/vendor/bundle/ruby/3.0.0/gems/activesupport-6.1.4.1/lib/active_support/dependencies.rb:326:in `load'
80
+
81
+ remote: /tmp/build_d54fb60d/vendor/bundle/ruby/3.0.0/gems/railties-6.1.4.1/lib/rails/engine.rb:681:in `block in load_config_initializer'
82
+
83
+ remote: /tmp/build_d54fb60d/vendor/bundle/ruby/3.0.0/gems/activesupport-6.1.4.1/lib/active_support/notifications.rb:205:in `instrument'
84
+
85
+ remote: /tmp/build_d54fb60d/vendor/bundle/ruby/3.0.0/gems/railties-6.1.4.1/lib/rails/engine.rb:680:in `load_config_initializer'
86
+
87
+ remote: /tmp/build_d54fb60d/vendor/bundle/ruby/3.0.0/gems/railties-6.1.4.1/lib/rails/engine.rb:634:in `block (2 levels) in <class:Engine>'
88
+
89
+ remote: /tmp/build_d54fb60d/vendor/bundle/ruby/3.0.0/gems/railties-6.1.4.1/lib/rails/engine.rb:633:in `each'
90
+
91
+ remote: /tmp/build_d54fb60d/vendor/bundle/ruby/3.0.0/gems/railties-6.1.4.1/lib/rails/engine.rb:633:in `block in <class:Engine>'
92
+
93
+ remote: /tmp/build_d54fb60d/vendor/bundle/ruby/3.0.0/gems/railties-6.1.4.1/lib/rails/initializable.rb:32:in `instance_exec'
94
+
95
+ remote: /tmp/build_d54fb60d/vendor/bundle/ruby/3.0.0/gems/railties-6.1.4.1/lib/rails/initializable.rb:32:in `run'
96
+
97
+ remote: /tmp/build_d54fb60d/vendor/bundle/ruby/3.0.0/gems/railties-6.1.4.1/lib/rails/initializable.rb:61:in `block in run_initializers'
98
+
99
+ remote: /tmp/build_d54fb60d/vendor/bundle/ruby/3.0.0/gems/railties-6.1.4.1/lib/rails/initializable.rb:50:in `each'
100
+
101
+ remote: /tmp/build_d54fb60d/vendor/bundle/ruby/3.0.0/gems/railties-6.1.4.1/lib/rails/initializable.rb:50:in `tsort_each_child'
102
+
103
+ remote: /tmp/build_d54fb60d/vendor/bundle/ruby/3.0.0/gems/railties-6.1.4.1/lib/rails/initializable.rb:60:in `run_initializers'
104
+
105
+ remote: /tmp/build_d54fb60d/vendor/bundle/ruby/3.0.0/gems/railties-6.1.4.1/lib/rails/application.rb:391:in `initialize!'
106
+
107
+ remote: /tmp/build_d54fb60d/config/environment.rb:5:in `<main>'
108
+
109
+ remote: /tmp/build_d54fb60d/vendor/bundle/ruby/3.0.0/gems/bootsnap-1.8.1/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:23:in `require'
110
+
111
+ remote: /tmp/build_d54fb60d/vendor/bundle/ruby/3.0.0/gems/bootsnap-1.8.1/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:23:in `block in require_with_bootsnap_lfi'
112
+
113
+ remote: /tmp/build_d54fb60d/vendor/bundle/ruby/3.0.0/gems/bootsnap-1.8.1/lib/bootsnap/load_path_cache/loaded_features_index.rb:92:in `register'
114
+
115
+ remote: /tmp/build_d54fb60d/vendor/bundle/ruby/3.0.0/gems/bootsnap-1.8.1/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:22:in `require_with_bootsnap_lfi'
116
+
117
+ remote: /tmp/build_d54fb60d/vendor/bundle/ruby/3.0.0/gems/bootsnap-1.8.1/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:31:in `require'
118
+
119
+ remote: /tmp/build_d54fb60d/vendor/bundle/ruby/3.0.0/gems/zeitwerk-2.4.2/lib/zeitwerk/kernel.rb:34:in `require'
120
+
121
+ remote: /tmp/build_d54fb60d/vendor/bundle/ruby/3.0.0/gems/activesupport-6.1.4.1/lib/active_support/dependencies.rb:332:in `block in require'
122
+
123
+ remote: /tmp/build_d54fb60d/vendor/bundle/ruby/3.0.0/gems/activesupport-6.1.4.1/lib/active_support/dependencies.rb:299:in `load_dependency'
124
+
125
+ remote: /tmp/build_d54fb60d/vendor/bundle/ruby/3.0.0/gems/activesupport-6.1.4.1/lib/active_support/dependencies.rb:332:in `require'
126
+
127
+ remote: /tmp/build_d54fb60d/vendor/bundle/ruby/3.0.0/gems/railties-6.1.4.1/lib/rails/application.rb:367:in `require_environment!'
128
+
129
+ remote: /tmp/build_d54fb60d/vendor/bundle/ruby/3.0.0/gems/railties-6.1.4.1/lib/rails/application.rb:533:in `block in run_tasks_blocks'
130
+
131
+ remote: /tmp/build_d54fb60d/vendor/bundle/ruby/3.0.0/gems/sprockets-rails-3.2.2/lib/sprockets/rails/task.rb:61:in `block (2 levels) in define'
132
+
133
+ remote: Tasks: TOP => environment
134
+
135
+ remote: (See full trace by running task with --trace)
136
+
137
+ remote:
138
+
139
+ remote: !
140
+
141
+ remote: ! Precompiling assets failed.
142
+
143
+ remote: !
144
+
145
+ remote: ! Push rejected, failed to compile Ruby app.
146
+
147
+ remote:
148
+
149
+ remote: ! Push failed
150
+
151
+ remote: !
152
+
153
+ remote: ! ## Warning - The same version of this code has already been built: 5c943d94b57e7f07c6c3ab0484bf96167854683a
154
+
155
+ remote: !
156
+
157
+ remote: ! We have detected that you have triggered a build from source code with version 5c943d94b57e7f07c6c3ab0484bf96167854683a
158
+
159
+ remote: ! at least twice. One common cause of this behavior is attempting to deploy code from a different branch.
160
+
161
+ remote: !
162
+
163
+ remote: ! If you are developing on a branch and deploying via git you must run:
164
+
165
+ remote: !
166
+
167
+ remote: ! git push heroku <branchname>:main
168
+
169
+ remote: !
170
+
171
+ remote: ! This article goes into details on the behavior:
172
+
173
+ remote: ! https://devcenter.heroku.com/articles/duplicate-build-version
174
+
175
+ remote:
176
+
177
+ remote: Verifying deploy...
178
+
179
+ ```
46
180
 
47
181
  Gemfile
48
182
 
183
+ ```
184
+
185
+ source 'https://rubygems.org'
186
+
187
+ git_source(:github) { |repo| "https://github.com/#{repo}.git" }
188
+
189
+
190
+
191
+ ruby '3.0.2'
192
+
193
+
194
+
195
+ # Bundle edge Rails instead: gem 'rails', github: 'rails/rails', branch: 'main'
196
+
197
+ gem 'rails', '~> 6.1.3', '>= 6.1.3.2'
198
+
199
+ # Use sqlite3 as the database for Active Record
200
+
201
+ #gem 'sqlite3', '~> 1.4' ##デプロイでここコメントアウトした
202
+
203
+ # Use Puma as the app server
204
+
205
+ gem 'puma', '~> 5.0'
206
+
207
+ # Use SCSS for stylesheets
208
+
209
+ gem 'sass-rails', '>= 6'
210
+
211
+ # Transpile app-like JavaScript. Read more: https://github.com/rails/webpacker
212
+
213
+ gem 'webpacker', '~> 5.0'
214
+
215
+ # Turbolinks makes navigating your web application faster. Read more: https://github.com/turbolinks/turbolinks
216
+
217
+ gem 'turbolinks', '~> 5'
218
+
219
+ # Build JSON APIs with ease. Read more: https://github.com/rails/jbuilder
220
+
221
+ gem 'jbuilder', '~> 2.7'
222
+
223
+ # Use Redis adapter to run Action Cable in production
224
+
225
+ # gem 'redis', '~> 4.0'
226
+
227
+ # Use Active Model has_secure_password
228
+
229
+ # gem 'bcrypt', '~> 3.1.7'
230
+
231
+
232
+
233
+ # Use Active Storage variant
234
+
235
+ # gem 'image_processing', '~> 1.2'
236
+
237
+
238
+
239
+ # Reduces boot times through caching; required in config/boot.rb
240
+
241
+ gem 'bootsnap', '>= 1.4.4', require: false
242
+
243
+
244
+
245
+ group :development, :test do
246
+
247
+ # Call 'byebug' anywhere in the code to stop execution and get a debugger console
248
+
249
+ gem 'byebug', platforms: [:mri, :mingw, :x64_mingw]
250
+
251
+ gem 'sqlite3' ##デプロイでここ追加した
252
+
253
+ end
254
+
255
+
256
+
257
+ group :development do
258
+
259
+ # Access an interactive console on exception pages or by calling 'console' anywhere in the code.
260
+
261
+ gem 'web-console', '>= 4.1.0'
262
+
263
+ # Display performance information such as SQL time and flame graphs for each request in your browser.
264
+
265
+ # Can be configured to work on production as well see: https://github.com/MiniProfiler/rack-mini-profiler/blob/master/README.md
266
+
267
+ gem 'rack-mini-profiler', '~> 2.0'
268
+
49
- ![イメージ説明](ffaa059992cf8f57cbb6008907644394.png)
269
+ gem 'listen', '~> 3.3'
270
+
50
-
271
+ # Spring speeds up development by keeping your application running in the background. Read more: https://github.com/rails/spring
272
+
273
+ gem 'spring'
274
+
275
+ end
276
+
277
+
278
+
279
+ group :test do
280
+
281
+ # Adds support for Capybara system testing and selenium driver
282
+
51
- ![イメージ説明](a95b2950cb171e157c993514582bf426.png)
283
+ gem 'capybara', '>= 3.26'
284
+
52
-
285
+ gem 'selenium-webdriver'
286
+
53
-
287
+ # Easy installation and use of web drivers to run system tests with browsers
288
+
289
+ gem 'webdrivers'
290
+
291
+ end
292
+
293
+
294
+
295
+ # Windows does not include zoneinfo files, so bundle the tzinfo-data gem
296
+
297
+ gem 'tzinfo-data', platforms: [:mingw, :mswin, :x64_mingw, :jruby]
298
+
299
+
300
+
301
+ gem 'devise'
302
+
303
+
304
+
305
+ gem 'config'
306
+
307
+
308
+
309
+ gem "jquery-rails"
310
+
311
+
312
+
313
+ gem 'carrierwave'
314
+
315
+
316
+
317
+ gem 'pry-rails'
318
+
319
+
320
+
321
+ gem 'fog-aws'
322
+
323
+
324
+
325
+ gem 'dotenv-rails'
326
+
327
+
328
+
329
+ gem 'rufo'
330
+
331
+
332
+
333
+ ##以下デプロイのために追加
334
+
335
+
336
+
337
+ group :production do
338
+
339
+ gem 'pg'
340
+
341
+ end
342
+
343
+ ```
54
344
 
55
345
  ### 試したこと
56
346
 

1

Gemfileとエラーメッセージの全文を追加しました

2021/09/07 06:59

投稿

退会済みユーザー
test CHANGED
File without changes
test CHANGED
@@ -38,7 +38,17 @@
38
38
 
39
39
  ```
40
40
 
41
+ エラーメッセージ
41
42
 
43
+ ![イメージ説明](ad0a49c7835c272417eb52e9f50c39d6.png)
44
+
45
+
46
+
47
+ Gemfile
48
+
49
+ ![イメージ説明](ffaa059992cf8f57cbb6008907644394.png)
50
+
51
+ ![イメージ説明](a95b2950cb171e157c993514582bf426.png)
42
52
 
43
53
 
44
54