質問編集履歴

3

エラー箇所の説明の為、部分的に全文掲載に変更する

2021/03/14 08:05

投稿

Hitokiyo-
Hitokiyo-

スコア7

test CHANGED
File without changes
test CHANGED
@@ -80,35 +80,7 @@
80
80
 
81
81
  01 /var/www/School-Seach/shared/bundle/ruby/2.5.0/gems/activesupport-5.2.4.5/lib/active_support/dependencies.rb:285:in `block in load'
82
82
 
83
- 01 /var/www/School-Seach/shared/bundle/ruby/2.5.0/gems/activesupport-5.2.4.5/lib/active_support/dependencies.rb:257:in `load_dependency'
84
-
85
- 01 /var/www/School-Seach/shared/bundle/ruby/2.5.0/gems/activesupport-5.2.4.5/lib/active_support/dependencies.rb:285:in `load'
86
-
87
- 01 /var/www/School-Seach/shared/bundle/ruby/2.5.0/gems/railties-5.2.4.5/lib/rails/engine.rb:663:in `block in load_config_initializer'
88
-
89
- 01 /var/www/School-Seach/shared/bundle/ruby/2.5.0/gems/activesupport-5.2.4.5/lib/active_support/notifications.rb:170:in `instrument'
90
-
91
- 01 /var/www/School-Seach/shared/bundle/ruby/2.5.0/gems/railties-5.2.4.5/lib/rails/engine.rb:662:in `load_config_initializer'
92
-
93
- 01 /var/www/School-Seach/shared/bundle/ruby/2.5.0/gems/railties-5.2.4.5/lib/rails/engine.rb:620:in `block (2 levels) in <class:Engine>'
94
-
95
- 01 /var/www/School-Seach/shared/bundle/ruby/2.5.0/gems/railties-5.2.4.5/lib/rails/engine.rb:619:in `each'
83
+   〜省略〜
96
-
97
- 01 /var/www/School-Seach/shared/bundle/ruby/2.5.0/gems/railties-5.2.4.5/lib/rails/engine.rb:619:in `block in <class:Engine>'
98
-
99
- 01 /var/www/School-Seach/shared/bundle/ruby/2.5.0/gems/railties-5.2.4.5/lib/rails/initializable.rb:32:in `instance_exec'
100
-
101
- 01 /var/www/School-Seach/shared/bundle/ruby/2.5.0/gems/railties-5.2.4.5/lib/rails/initializable.rb:32:in `run'
102
-
103
- 01 /var/www/School-Seach/shared/bundle/ruby/2.5.0/gems/railties-5.2.4.5/lib/rails/initializable.rb:61:in `block in run_initializers'
104
-
105
- 01 /var/www/School-Seach/shared/bundle/ruby/2.5.0/gems/railties-5.2.4.5/lib/rails/initializable.rb:50:in `each'
106
-
107
- 01 /var/www/School-Seach/shared/bundle/ruby/2.5.0/gems/railties-5.2.4.5/lib/rails/initializable.rb:50:in `tsort_each_child'
108
-
109
- 01 /var/www/School-Seach/shared/bundle/ruby/2.5.0/gems/railties-5.2.4.5/lib/rails/initializable.rb:60:in `run_initializers'
110
-
111
- 01 /var/www/School-Seach/shared/bundle/ruby/2.5.0/gems/railties-5.2.4.5/lib/rails/application.rb:361:in `initialize!'
112
84
 
113
85
  01 /var/www/School-Seach/releases/20210313030637/config/environment.rb:5:in `<top (required)>'
114
86
 
@@ -118,7 +90,7 @@
118
90
 
119
91
  01 /var/www/School-Seach/shared/bundle/ruby/2.5.0/gems/bootsnap-1.7.2/lib/bootsnap/load_path_cache/loaded_features_index.rb:92:in `register'
120
92
 
121
-                                 〜省略〜
93
+       〜省略〜
122
94
 
123
95
  01 /var/www/School-Seach/shared/bundle/ruby/2.5.0/gems/railties-5.2.4.5/lib/rails/application.rb:520:in `block in run_tasks_blocks'
124
96
 
@@ -268,66 +240,134 @@
268
240
 
269
241
  namespace :deploy do
270
242
 
243
+ desc "Make sure local git is in sync with remote."
244
+
245
+ task :confirm do
246
+
247
+ on roles(:app) do
248
+
249
+ puts "This stage is '#{fetch(:stage)}'. Deploying branch is '#{fetch(:branch)}'."
250
+
251
+ puts 'Are you sure? [y/n]'
252
+
253
+ ask :answer, 'n'
254
+
255
+ if fetch(:answer) != 'y'
256
+
257
+ puts 'deploy stopped'
258
+
259
+ exit
260
+
261
+ end
262
+
263
+ end
264
+
265
+ end
266
+
267
+
268
+
269
+ desc 'Initial Deploy'
270
+
271
+ task :initial do
272
+
273
+ on roles(:app) do
274
+
275
+ invoke 'deploy'
276
+
277
+ end
278
+
279
+ end
280
+
281
+
282
+
283
+ desc "Restart Application"
284
+
285
+ task :restart do
286
+
287
+ on roles(:app), in: :sequence, wait: 5 do
288
+
289
+ invoke 'puma:restart'
290
+
291
+ end
292
+
293
+ end
294
+
295
+
296
+
297
+ desc 'upload master.key'
298
+
299
+ task :upload do
300
+
301
+ on roles(:app) do |_host|
302
+
303
+ execute "mkdir -p #{shared_path}/config" if test "[ ! -d #{shared_path}/config ]"
304
+
305
+ end
306
+
307
+ end
308
+
309
+
310
+
311
+ before :starting, :confirm
312
+
313
+ end
314
+
315
+ ```
316
+
317
+ Capfile
318
+
319
+ ```
320
+
321
+ require "capistrano/setup"
322
+
323
+ require "capistrano/deploy"
324
+
325
+ require "capistrano/scm/git"
326
+
327
+ install_plugin Capistrano::SCM::Git
328
+
329
+ require 'capistrano/rbenv'
330
+
331
+ require 'capistrano/bundler'
332
+
333
+ require 'capistrano/rails/assets'
334
+
335
+ require 'capistrano/rails/migrations'
336
+
337
+ require 'capistrano/puma'
338
+
339
+ install_plugin Capistrano::Puma
340
+
341
+ Dir.glob("lib/capistrano/tasks/*.rake").each { |r| import r }
342
+
343
+ ```
344
+
345
+ config/initializers/devise.rb
346
+
347
+ ```
348
+
349
+ Devise.setup do |config|
350
+
351
+
352
+
271
353
  〜省略〜
272
354
 
355
+ config.omniauth :facebook, Rails.application.credentials.facebook[:key],
356
+
357
+ Rails.application.credentials.facebook[:secret]
358
+
359
+ config.omniauth :twitter, Rails.application.credentials.facebook[:key],
360
+
361
+ Rails.application.credentials.facebook[:secret]
362
+
363
+ OmniAuth.config.logger = Rails.logger if Rails.env.development?
364
+
365
+
366
+
273
367
  end
274
368
 
275
369
  ```
276
370
 
277
- Capfile
278
-
279
- ```
280
-
281
- require "capistrano/setup"
282
-
283
- require "capistrano/deploy"
284
-
285
- require "capistrano/scm/git"
286
-
287
- install_plugin Capistrano::SCM::Git
288
-
289
- require 'capistrano/rbenv'
290
-
291
- require 'capistrano/bundler'
292
-
293
- require 'capistrano/rails/assets'
294
-
295
- require 'capistrano/rails/migrations'
296
-
297
- require 'capistrano/puma'
298
-
299
- install_plugin Capistrano::Puma
300
-
301
- Dir.glob("lib/capistrano/tasks/*.rake").each { |r| import r }
302
-
303
- ```
304
-
305
- config/initializers/devise.rb
306
-
307
- ```
308
-
309
- Devise.setup do |config|
310
-
311
-
312
-
313
- 〜省略〜
314
-
315
- config.omniauth :facebook, Rails.application.credentials.facebook[:key],
316
-
317
- Rails.application.credentials.facebook[:secret]
318
-
319
- config.omniauth :twitter, Rails.application.credentials.facebook[:key],
320
-
321
- Rails.application.credentials.facebook[:secret]
322
-
323
- OmniAuth.config.logger = Rails.logger if Rails.env.development?
324
-
325
-
326
-
327
- end
328
-
329
- ```
330
-
331
371
  .circleci/config.yml
332
372
 
333
373
  ```ここに言語を入力

2

不要な番付を削除

2021/03/14 08:05

投稿

Hitokiyo-
Hitokiyo-

スコア7

test CHANGED
File without changes
test CHANGED
@@ -138,7 +138,7 @@
138
138
 
139
139
  ```
140
140
 
141
- ### 試したこと
141
+ ### 試したこと
142
142
 
143
143
  上記のエラー分から調べてみたところ、credentials.myl.encとmaster.keyの整合性が無いことからエラーが起きるという情報を得たので、対象のファイルの内容が合っているか確認しました。
144
144
 

1

参考ファイルの不足分を追加する

2021/03/13 07:18

投稿

Hitokiyo-
Hitokiyo-

スコア7

test CHANGED
File without changes
test CHANGED
@@ -274,6 +274,34 @@
274
274
 
275
275
  ```
276
276
 
277
+ Capfile
278
+
279
+ ```
280
+
281
+ require "capistrano/setup"
282
+
283
+ require "capistrano/deploy"
284
+
285
+ require "capistrano/scm/git"
286
+
287
+ install_plugin Capistrano::SCM::Git
288
+
289
+ require 'capistrano/rbenv'
290
+
291
+ require 'capistrano/bundler'
292
+
293
+ require 'capistrano/rails/assets'
294
+
295
+ require 'capistrano/rails/migrations'
296
+
297
+ require 'capistrano/puma'
298
+
299
+ install_plugin Capistrano::Puma
300
+
301
+ Dir.glob("lib/capistrano/tasks/*.rake").each { |r| import r }
302
+
303
+ ```
304
+
277
305
  config/initializers/devise.rb
278
306
 
279
307
  ```