質問編集履歴
3
エラー箇所の説明の為、部分的に全文掲載に変更する
title
CHANGED
File without changes
|
body
CHANGED
@@ -39,26 +39,12 @@
|
|
39
39
|
01 /var/www/School-Seach/shared/bundle/ruby/2.5.0/gems/bootsnap-1.7.2/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:59:in `load'
|
40
40
|
01 /var/www/School-Seach/shared/bundle/ruby/2.5.0/gems/bootsnap-1.7.2/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:59:in `load'
|
41
41
|
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'
|
42
|
-
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'
|
43
|
-
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'
|
44
|
-
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'
|
45
|
-
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'
|
46
|
-
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'
|
47
|
-
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>'
|
48
|
-
|
42
|
+
〜省略〜
|
49
|
-
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>'
|
50
|
-
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'
|
51
|
-
01 /var/www/School-Seach/shared/bundle/ruby/2.5.0/gems/railties-5.2.4.5/lib/rails/initializable.rb:32:in `run'
|
52
|
-
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'
|
53
|
-
01 /var/www/School-Seach/shared/bundle/ruby/2.5.0/gems/railties-5.2.4.5/lib/rails/initializable.rb:50:in `each'
|
54
|
-
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'
|
55
|
-
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'
|
56
|
-
01 /var/www/School-Seach/shared/bundle/ruby/2.5.0/gems/railties-5.2.4.5/lib/rails/application.rb:361:in `initialize!'
|
57
43
|
01 /var/www/School-Seach/releases/20210313030637/config/environment.rb:5:in `<top (required)>'
|
58
44
|
01 /var/www/School-Seach/shared/bundle/ruby/2.5.0/gems/bootsnap-1.7.2/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:23:in `require'
|
59
45
|
01 /var/www/School-Seach/shared/bundle/ruby/2.5.0/gems/bootsnap-1.7.2/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:23:in `block in re…
|
60
46
|
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'
|
61
|
-
|
47
|
+
〜省略〜
|
62
48
|
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'
|
63
49
|
01 /var/www/School-Seach/shared/bundle/ruby/2.5.0/gems/sprockets-rails-3.2.2/lib/sprockets/rails/task.rb:61:in `block (2 levels) in define'
|
64
50
|
01 /var/www/School-Seach/shared/bundle/ruby/2.5.0/gems/rake-13.0.3/exe/rake:27:in `<top (required)>'
|
@@ -133,7 +119,41 @@
|
|
133
119
|
set :log_level, :debug
|
134
120
|
|
135
121
|
namespace :deploy do
|
122
|
+
desc "Make sure local git is in sync with remote."
|
123
|
+
task :confirm do
|
124
|
+
on roles(:app) do
|
125
|
+
puts "This stage is '#{fetch(:stage)}'. Deploying branch is '#{fetch(:branch)}'."
|
126
|
+
puts 'Are you sure? [y/n]'
|
127
|
+
ask :answer, 'n'
|
128
|
+
if fetch(:answer) != 'y'
|
129
|
+
puts 'deploy stopped'
|
136
|
-
|
130
|
+
exit
|
131
|
+
end
|
132
|
+
end
|
133
|
+
end
|
134
|
+
|
135
|
+
desc 'Initial Deploy'
|
136
|
+
task :initial do
|
137
|
+
on roles(:app) do
|
138
|
+
invoke 'deploy'
|
139
|
+
end
|
140
|
+
end
|
141
|
+
|
142
|
+
desc "Restart Application"
|
143
|
+
task :restart do
|
144
|
+
on roles(:app), in: :sequence, wait: 5 do
|
145
|
+
invoke 'puma:restart'
|
146
|
+
end
|
147
|
+
end
|
148
|
+
|
149
|
+
desc 'upload master.key'
|
150
|
+
task :upload do
|
151
|
+
on roles(:app) do |_host|
|
152
|
+
execute "mkdir -p #{shared_path}/config" if test "[ ! -d #{shared_path}/config ]"
|
153
|
+
end
|
154
|
+
end
|
155
|
+
|
156
|
+
before :starting, :confirm
|
137
157
|
end
|
138
158
|
```
|
139
159
|
Capfile
|
2
不要な番付を削除
title
CHANGED
File without changes
|
body
CHANGED
@@ -68,7 +68,7 @@
|
|
68
68
|
01 ArgumentError: invalid base64
|
69
69
|
〜省略〜
|
70
70
|
```
|
71
|
-
### 試したこと
|
71
|
+
### 試したこと
|
72
72
|
上記のエラー分から調べてみたところ、credentials.myl.encとmaster.keyの整合性が無いことからエラーが起きるという情報を得たので、対象のファイルの内容が合っているか確認しました。
|
73
73
|
|
74
74
|
・ローカル環境のファイルを確認する。
|
1
参考ファイルの不足分を追加する
title
CHANGED
File without changes
|
body
CHANGED
@@ -136,6 +136,20 @@
|
|
136
136
|
〜省略〜
|
137
137
|
end
|
138
138
|
```
|
139
|
+
Capfile
|
140
|
+
```
|
141
|
+
require "capistrano/setup"
|
142
|
+
require "capistrano/deploy"
|
143
|
+
require "capistrano/scm/git"
|
144
|
+
install_plugin Capistrano::SCM::Git
|
145
|
+
require 'capistrano/rbenv'
|
146
|
+
require 'capistrano/bundler'
|
147
|
+
require 'capistrano/rails/assets'
|
148
|
+
require 'capistrano/rails/migrations'
|
149
|
+
require 'capistrano/puma'
|
150
|
+
install_plugin Capistrano::Puma
|
151
|
+
Dir.glob("lib/capistrano/tasks/*.rake").each { |r| import r }
|
152
|
+
```
|
139
153
|
config/initializers/devise.rb
|
140
154
|
```
|
141
155
|
Devise.setup do |config|
|