RubyZip 3.0 is coming!
**********************
一部のRubyzipクラスのパブリックAPIは、オプション引数に名前付きパラメータを使用するように近代化されました。次のクラスの使用法を確認してください。
* `Zip::File`
* `Zip::Entry`
* `Zip::InputStream`
* `Zip::OutputStream`
Gemfileと.gemspecが適切に制限されており、3.0がリリースされたときに予期しない破損が発生しないようにしてください(例:~> 2.3.0)。詳細については、https://github.com/rubyzip/rubyzip を参照してください。チェンジログには、バージョン2.3.0以降に実装されたその他の機能強化とバグ修正も記載されています。
I, [2022-07-24T01:58:05.415957 #1] INFO -- : > cd /var/www/discourse & su discourse -c 'bundle exec rake plugin:pull_compatible_all'
bundler: failed to load command: rake (/var/www/discourse/vendor/bundle/ruby/2.7.0/bin/rake)
/usr/local/lib/ruby/gems/2.7.0/gems/bundler-2.3.18/lib/bundler/runtime.rb:308:in `check_for_activated_spec!': You have already activated uri 0.10.0, but your Gemfile requires uri 0.11.0. Since uri is a default gem, you can either remove your dependency on it or try updating to a newer version of bundler that supports uri as a default gem. (Gem::LoadError)
from /usr/local/lib/ruby/gems/2.7.0/gems/bundler-2.3.18/lib/bundler/runtime.rb:25:in `block in setup'
from /usr/local/lib/ruby/gems/2.7.0/gems/bundler-2.3.18/lib/bundler/spec_set.rb:140:in `each'
from /usr/local/lib/ruby/gems/2.7.0/gems/bundler-2.3.18/lib/bundler/spec_set.rb:140:in `each'
from /usr/local/lib/ruby/gems/2.7.0/gems/bundler-2.3.18/lib/bundler/runtime.rb:24:in `map'
from /usr/local/lib/ruby/gems/2.7.0/gems/bundler-2.3.18/lib/bundler/runtime.rb:24:in `setup'
from /usr/local/lib/ruby/gems/2.7.0/gems/bundler-2.3.18/lib/bundler.rb:162:in `setup'
from /usr/local/lib/ruby/gems/2.7.0/gems/bundler-2.3.18/lib/bundler/setup.rb:20:in `block in <top (required)>'
from /usr/local/lib/ruby/gems/2.7.0/gems/bundler-2.3.18/lib/bundler/ui/shell.rb:136:in `with_level'
from /usr/local/lib/ruby/gems/2.7.0/gems/bundler-2.3.18/lib/bundler/ui/shell.rb:88:in `silence'
from /usr/local/lib/ruby/gems/2.7.0/gems/bundler-2.3.18/lib/bundler/setup.rb:20:in `<top (required)>'
from /usr/local/lib/ruby/gems/2.7.0/gems/bundler-2.3.18/lib/bundler/cli/exec.rb:56:in `require_relative'
from /usr/local/lib/ruby/gems/2.7.0/gems/bundler-2.3.18/lib/bundler/cli/exec.rb:56:in `kernel_load'
from /usr/local/lib/ruby/gems/2.7.0/gems/bundler-2.3.18/lib/bundler/cli/exec.rb:23:in `run'
from /usr/local/lib/ruby/gems/2.7.0/gems/bundler-2.3.18/lib/bundler/cli.rb:483:in `exec'
from /usr/local/lib/ruby/gems/2.7.0/gems/bundler-2.3.18/lib/bundler/vendor/thor/lib/thor/command.rb:27:in `run'
from /usr/local/lib/ruby/gems/2.7.0/gems/bundler-2.3.18/lib/bundler/vendor/thor/lib/thor/invocation.rb:127:in `invoke_command'
from /usr/local/lib/ruby/gems/2.7.0/gems/bundler-2.3.18/lib/bundler/vendor/thor/lib/thor.rb:392:in `dispatch'
from /usr/local/lib/ruby/gems/2.7.0/gems/bundler-2.3.18/lib/bundler/cli.rb:31:in `dispatch'
from /usr/local/lib/ruby/gems/2.7.0/gems/bundler-2.3.18/lib/bundler/vendor/thor/lib/thor/base.rb:485:in `start'
from /usr/local/lib/ruby/gems/2.7.0/gems/bundler-2.3.18/lib/bundler/cli.rb:25:in `start'
from /usr/local/lib/ruby/gems/2.7.0/gems/bundler-2.3.18/exe/bundle:48:in `block in <top (required)>'
from /usr/local/lib/ruby/gems/2.7.0/gems/bundler-2.3.18/lib/bundler/friendly_errors.rb:120:in `with_friendly_errors'
from /usr/local/lib/ruby/gems/2.7.0/gems/bundler-2.3.18/exe/bundle:36:in `<top (required)>'
from /usr/local/bin/bundle:23:in `load'
from /usr/local/bin/bundle:23:in `<main>'
I, [2022-07-24T01:58:05.702191 #1] INFO -- :
I, [2022-07-24T01:58:05.702665 #1] INFO -- : > cd /var/www/discourse & su discourse -c 'bundle exec rake db:migrate'
bundler: failed to load command: rake (/var/www/discourse/vendor/bundle/ruby/2.7.0/bin/rake)
/usr/local/lib/ruby/gems/2.7.0/gems/bundler-2.3.18/lib/bundler/runtime.rb:308:in `check_for_activated_spec!': You have already activated uri 0.10.0, but your Gemfile requires uri 0.11.0. Since uri is a default gem, you can either remove your dependency on it or try updating to a newer version of bundler that supports uri as a default gem. (Gem::LoadError)
from /usr/local/lib/ruby/gems/2.7.0/gems/bundler-2.3.18/lib/bundler/runtime.rb:25:in `block in setup'
from /usr/local/lib/ruby/gems/2.7.0/gems/bundler-2.3.18/lib/bundler/spec_set.rb:140:in `each'
from /usr/local/lib/ruby/gems/2.7.0/gems/bundler-2.3.18/lib/bundler/spec_set.rb:140:in `each'
from /usr/local/lib/ruby/gems/2.7.0/gems/bundler-2.3.18/lib/bundler/runtime.rb:24:in `map'
from /usr/local/lib/ruby/gems/2.7.0/gems/bundler-2.3.18/lib/bundler/runtime.rb:24:in `setup'
from /usr/local/lib/ruby/gems/2.7.0/gems/bundler-2.3.18/lib/bundler.rb:162:in `setup'
from /usr/local/lib/ruby/gems/2.7.0/gems/bundler-2.3.18/lib/bundler/setup.rb:20:in `block in <top (required)>'
from /usr/local/lib/ruby/gems/2.7.0/gems/bundler-2.3.18/lib/bundler/ui/shell.rb:136:in `with_level'
from /usr/local/lib/ruby/gems/2.7.0/gems/bundler-2.3.18/lib/bundler/ui/shell.rb:88:in `silence'
from /usr/local/lib/ruby/gems/2.7.0/gems/bundler-2.3.18/lib/bundler/setup.rb:20:in `<top (required)>'
from /usr/local/lib/ruby/gems/2.7.0/gems/bundler-2.3.18/lib/bundler/cli/exec.rb:56:in `require_relative'
from /usr/local/lib/ruby/gems/2.7.0/gems/bundler-2.3.18/lib/bundler/cli/exec.rb:56:in `kernel_load'
from /usr/local/lib/ruby/gems/2.7.0/gems/bundler-2.3.18/lib/bundler/cli/exec.rb:23:in `run'
from /usr/local/lib/ruby/gems/2.7.0/gems/bundler-2.3.18/lib/bundler/cli.rb:483:in `exec'
from /usr/local/lib/ruby/gems/2.7.0/gems/bundler-2.3.18/lib/bundler/vendor/thor/lib/thor/command.rb:27:in `run'
from /usr/local/lib/ruby/gems/2.7.0/gems/bundler-2.3.18/lib/bundler/vendor/thor/lib/thor/invocation.rb:127:in `invoke_command'
from /usr/local/lib/ruby/gems/2.7.0/gems/bundler-2.3.18/lib/bundler/vendor/thor/lib/thor.rb:392:in `dispatch'
from /usr/local/lib/ruby/gems/2.7.0/gems/bundler-2.3.18/lib/bundler/cli.rb:31:in `dispatch'
from /usr/local/lib/ruby/gems/2.7.0/gems/bundler-2.3.18/lib/bundler/vendor/thor/lib/thor/base.rb:485:in `start'
from /usr/local/lib/ruby/gems/2.7.0/gems/bundler-2.3.18/lib/bundler/cli.rb:25:in `start'
from /usr/local/lib/ruby/gems/2.7.0/gems/bundler-2.3.18/exe/bundle:48:in `block in <top (required)>'
from /usr/local/lib/ruby/gems/2.7.0/gems/bundler-2.3.18/lib/bundler/friendly_errors.rb:120:in `with_friendly_errors'
from /usr/local/lib/ruby/gems/2.7.0/gems/bundler-2.3.18/exe/bundle:36:in `<top (required)>'
from /usr/local/bin/bundle:23:in `load'
from /usr/local/bin/bundle:23:in `<main>'
I, [2022-07-24T01:58:05.953429 #1] INFO -- :
run ブロックに exec: echo \"Beginning of custom commands\" の後に追記したのですが、遅すぎたようです。
そこで hooks: -> after_code: に追記しました。
すると、以下のようになりました。
I, [2022-07-24T12:13:24.641982 #1] INFO -- : > cd /var/www/discourse & su discourse -c 'gem update uri'
ERROR: While executing gem ... (Gem::FilePermissionError)
You don't have write permissions for the /usr/local/lib/ruby/gems/2.7.0 directory.
I, [2022-07-24T12:13:29.392041 #1] INFO -- : Updating installed gems
Updating uri
FAILED
--------------------
Pups::ExecError: cd /var/www/discourse & su discourse -c 'gem update uri' failed with return #<Process::Status: pid 132 exit 1>
Location of failure: /pups/lib/pups/exec_command.rb:112:in `spawn'
exec failed with the params {"cd"=>"$home", "cmd"=>["su discourse -c 'gem update uri'"]}
念のため su discourse を削除したところ、進行はしましたが、別のエラーが発生しました。
I, [2022-07-24T12:21:17.497935 #1] INFO -- : > cd /var/www/discourse & su discourse -c 'bundle exec rake themes:update assets:precompile'
sh: 1: yarn: not found
I, [2022-07-24T12:21:19.397390 #1] INFO -- :
FAILED
--------------------
Pups::ExecError: cd /var/www/discourse & su discourse -c 'bundle exec rake themes:update assets:precompile' failed with return #<Process::Status: pid 5373 exit 127>
Location of failure: /pups/lib/pups/exec_command.rb:112:in `spawn'
I, [2022-07-24T12:37:42.295754 #1] INFO -- : > cd /var/www/discourse & su discourse -c 'bundle exec rake plugin:pull_compatible_all'
WARNING: Plugins were activated before running `rake plugin:pull_compatible_all`
You should prefix this command with LOAD_PLUGINS=0
I, [2022-07-24T12:37:44.807237 #1] INFO -- :
I, [2022-07-24T12:37:44.807548 #1] INFO -- : > cd /var/www/discourse & su discourse -c 'bundle exec rake db:migrate'
I, [2022-07-24T12:37:48.578845 #1] INFO -- :
I, [2022-07-24T12:37:48.579098 #1] INFO -- : > cd /var/www/discourse & su discourse -c 'bundle exec rake themes:update assets:precompile'
error Command "ember" not found.
I, [2022-07-24T12:37:50.795001 #1] INFO -- : yarn run v1.22.19
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
FAILED
--------------------
Pups::ExecError: cd /var/www/discourse & su discourse -c 'bundle exec rake themes:update assets:precompile' failed with return #<Process::Status: pid 5409 exit 1>
Location of failure: /pups/lib/pups/exec_command.rb:112:in `spawn'
exec failed with the params {"cd"=>"$home", "hook"=>"assets_precompile", "cmd"=>["su discourse -c 'bundle exec rake themes:update assets:precompile'"]}