https://forum.shakacode.com/ 无法访问!而它是编程社区的重要资源!
也许只需升级 Bundler?
这个错误或许指向了问题的解决方案。
或者,也许我不该拉取最新的提交?
I, [2022-10-16T02:45:18.566757 #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.22/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)
详细信息
我点击了升级按钮(尽管有人告诉我无需升级),结果出现了以下错误:
注意,我运行的是 @pfaffman 提供的方案:Managing a Two-Container Installation - Documentation - Literate Computing Support)。
Web 更新错误
运行 `yarn` 以安装缺失的依赖项。
堆栈跟踪和错误报告:/tmp/error.dump.8a3fdba3a5809ddb3503549a816f6515.log
在 ember-cli-dependency-checker 的构造函数中发生错误,路径为 /var/www/discourse/app/assets/javascripts/node_modules/ember-cli-dependency-checker
错误:命令执行失败,退出代码为 1。
有关此命令的文档,请访问 https://yarnpkg.com/en/docs/cli/run
Docker Manager:升级失败
<RuntimeError: RuntimeError>
/var/www/discourse/plugins/docker_manager/lib/docker_manager/upgrader.rb:202:in `run'
/var/www/discourse/plugins/docker_manager/lib/docker_manager/upgrader.rb:104:in `upgrade'
/var/www/discourse/plugins/docker_manager/scripts/docker_manager_upgrade.rb:19:in `block in <main>'
/var/www/discourse/vendor/bundle/ruby/2.7.0/gems/activesupport-6.1.4.1/lib/active_support/fork_tracker.rb:10:in `block in fork'
/var/www/discourse/vendor/bundle/ruby/2.7.0/gems/activesupport-6.1.4.1/lib/active_support/fork_tracker.rb:8:in `fork'
/var/www/discourse/vendor/bundle/ruby/2.7.0/gems/activesupport-6.1.4.1/lib/active_support/fork_tracker.rb:8:in `fork'
/var/www/discourse/vendor/bundle/ruby/2.7.0/gems/activesupport-6.1.4.1/lib/active_support/fork_tracker.rb:27:in `fork'
/var/www/discourse/plugins/docker_manager/scripts/docker_manager_upgrade.rb:6:in `<main>'
/var/www/discourse/vendor/bundle/ruby/2.7.0/gems/bootsnap-1.9.1/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:60:in `load'
/var/www/discourse/vendor/bundle/ruby/2.7.0/gems/bootsnap-1.9.1/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:60:in `load'
/var/www/discourse/vendor/bundle/ruby/2.7.0/gems/railties-6.1.4.1/lib/rails/commands/runner/runner_command.rb:42:in `perform'
/var/www/discourse/vendor/bundle/ruby/2.7.0/gems/thor-1.1.0/lib/thor/command.rb:27:in `run'
/var/www/discourse/vendor/bundle/ruby/2.7.0/gems/thor-1.1.0/lib/thor/invocation.rb:127:in `invoke_command'
/var/www/discourse/vendor/bundle/ruby/2.7.0/gems/thor-1.1.0/lib/thor.rb:392:in `dispatch'
/var/www/discourse/vendor/bundle/ruby/2.7.0/gems/railties-6.1.4.1/lib/rails/command/base.rb:69:in `perform'
/var/www/discourse/vendor/bundle/ruby/2.7.0/gems/railties-6.1.4.1/lib/rails/command.rb:48:in `invoke'
/var/www/discourse/vendor/bundle/ruby/2.7.0/gems/railties-6.1.4.1/lib/rails/commands.rb:18:in `<main>'
/var/www/discourse/vendor/bundle/ruby/2.7.0/gems/bootsnap-1.9.1/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:23:in `require'
/var/www/discourse/vendor/bundle/ruby/2.7.0/gems/bootsnap-1.9.1/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:23:in `block in require_with_bootsnap_lfi'
/var/www/discourse/vendor/bundle/ruby/2.7.0/gems/bootsnap-1.9.1/lib/bootsnap/load_path_cache/loaded_features_index.rb:92:in `register'
/var/www/discourse/vendor/bundle/ruby/2.7.0/gems/bootsnap-1.9.1/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:22:in `require_with_bootsnap_lfi'
/var/www/discourse/vendor/bundle/ruby/2.7.0/gems/bootsnap-1.9.1/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:31:in `require'
bin/rails:18:in `<main>'
正在启动之前停止的 2 个 Unicorn 工作进程
随后我登录到服务器,执行了以下命令,并得到了这个错误:
然后登录:
cd /var/discourse
git pull
./launcher bootstrap web_only && ./launcher destroy web_only && ./launcher start web_only
I, [2022-10-16T02:45:18.566757 #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.22/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.22/lib/bundler/runtime.rb:25:in `block in setup'
from /usr/local/lib/ruby/gems/2.7.0/gems/bundler-2.3.22/lib/bundler/spec_set.rb:155:in `each'
from /usr/local/lib/ruby/gems/2.7.0/gems/bundler-2.3.22/lib/bundler/spec_set.rb:155:in `each'
from /usr/local/lib/ruby/gems/2.7.0/gems/bundler-2.3.22/lib/bundler/runtime.rb:24:in `map'
from /usr/local/lib/ruby/gems/2.7.0/gems/bundler-2.3.22/lib/bundler/runtime.rb:24:in `setup'
from /usr/local/lib/ruby/gems/2.7.0/gems/bundler-2.3.22/lib/bundler.rb:162:in `setup'
from /usr/local/lib/ruby/gems/2.7.0/gems/bundler-2.3.22/lib/bundler/setup.rb:20:in `block in <top (required)>'
from /usr/local/lib/ruby/gems/2.7.0/gems/bundler-2.3.22/lib/bundler/ui/shell.rb:136:in `with_level'
from /usr/local/lib/ruby/gems/2.7.0/gems/bundler-2.3.22/lib/bundler/ui/shell.rb:88:in `silence'
from /usr/local/lib/ruby/gems/2.7.0/gems/bundler-2.3.22/lib/bundler/setup.rb:20:in `<top (required)>'
from /usr/local/lib/ruby/gems/2.7.0/gems/bundler-2.3.22/lib/bundler/cli/exec.rb:56:in `require_relative'
from /usr/local/lib/ruby/gems/2.7.0/gems/bundler-2.3.22/lib/bundler/cli/exec.rb:56:in `kernel_load'
from /usr/local/lib/ruby/gems/2.7.0/gems/bundler-2.3.22/lib/bundler/cli/exec.rb:23:in `run'
from /usr/local/lib/ruby/gems/2.7.0/gems/bundler-2.3.22/lib/bundler/cli.rb:486:in `exec'
from /usr/local/lib/ruby/gems/2.7.0/gems/bundler-2.3.22/lib/bundler/vendor/thor/lib/thor/command.rb:27:in `run'
from /usr/local/lib/ruby/gems/2.7.0/gems/bundler-2.3.22/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.22/lib/bundler/vendor/thor/lib/thor.rb:392:in `dispatch'
from /usr/local/lib/ruby/gems/2.7.0/gems/bundler-2.3.22/lib/bundler/cli.rb:31:in `dispatch'
from /usr/local/lib/ruby/gems/2.7.0/gems/bundler-2.3.22/lib/bundler/vendor/thor/lib/thor/base.rb:485:in `start'
from /usr/local/lib/ruby/gems/2.7.0/gems/bundler-2.3.22/lib/bundler/cli.rb:25:in `start'
from /usr/local/lib/ruby/gems/2.7.0/gems/bundler-2.3.22/exe/bundle:48:in `block in <top (required)>'
from /usr/local/lib/ruby/gems/2.7.0/gems/bundler-2.3.22/lib/bundler/friendly_errors.rb:120:in `with_friendly_errors'
from /usr/local/lib/ruby/gems/2.7.0/gems/bundler-2.3.22/exe/bundle:36:in `<top (required)>'
from /usr/local/bin/bundle:23:in `load'
from /usr/local/bin/bundle:23:in `<main>'
I, [2022-10-16T02:45:19.374919 #1] INFO -- :
I, [2022-10-16T02:45:19.383582 #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.22/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.22/lib/bundler/runtime.rb:25:in `block in setup'
from /usr/local/lib/ruby/gems/2.7.0/gems/bundler-2.3.22/lib/bundler/spec_set.rb:155:in `each'
from /usr/local/lib/ruby/gems/2.7.0/gems/bundler-2.3.22/lib/bundler/spec_set.rb:155:in `each'
from /usr/local/lib/ruby/gems/2.7.0/gems/bundler-2.3.22/lib/bundler/runtime.rb:24:in `map'
from /usr/local/lib/ruby/gems/2.7.0/gems/bundler-2.3.22/lib/bundler/runtime.rb:24:in `setup'
from /usr/local/lib/ruby/gems/2.7.0/gems/bundler-2.3.22/lib/bundler.rb:162:in `setup'
from /usr/local/lib/ruby/gems/2.7.0/gems/bundler-2.3.22/lib/bundler/setup.rb:20:in `block in <top (required)>'
from /usr/local/lib/ruby/gems/2.7.0/gems/bundler-2.3.22/lib/bundler/ui/shell.rb:136:in `with_level'
from /usr/local/lib/ruby/gems/2.7.0/gems/bundler-2.3.22/lib/bundler/ui/shell.rb:88:in `silence'
from /usr/local/lib/ruby/gems/2.7.0/gems/bundler-2.3.22/lib/bundler/setup.rb:20:in `<top (required)>'
from /usr/local/lib/ruby/gems/2.7.0/gems/bundler-2.3.22/lib/bundler/cli/exec.rb:56:in `require_relative'
from /usr/local/lib/ruby/gems/2.7.0/gems/bundler-2.3.22/lib/bundler/cli/exec.rb:56:in `kernel_load'
from /usr/local/lib/ruby/gems/2.7.0/gems/bundler-2.3.22/lib/bundler/cli/exec.rb:23:in `run'
from /usr/local/lib/ruby/gems/2.7.0/gems/bundler-2.3.22/lib/bundler/cli.rb:486:in `exec'
from /usr/local/lib/ruby/gems/2.7.0/gems/bundler-2.3.22/lib/bundler/vendor/thor/lib/thor/command.rb:27:in `run'
from /usr/local/lib/ruby/gems/2.7.0/gems/bundler-2.3.22/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.22/lib/bundler/vendor/thor/lib/thor.rb:392:in `dispatch'
from /usr/local/lib/ruby/gems/2.7.0/gems/bundler-2.3.22/lib/bundler/cli.rb:31:in `dispatch'
from /usr/local/lib/ruby/gems/2.7.0/gems/bundler-2.3.22/lib/bundler/vendor/thor/lib/thor/base.rb:485:in `start'
from /usr/local/lib/ruby/gems/2.7.0/gems/bundler-2.3.22/lib/bundler/cli.rb:25:in `start'
from /usr/local/lib/ruby/gems/2.7.0/gems/bundler-2.3.22/exe/bundle:48:in `block in <top (required)>'
from /usr/local/lib/ruby/gems/2.7.0/gems/bundler-2.3.22/lib/bundler/friendly_errors.rb:120:in `with_friendly_errors'
from /usr/local/lib/ruby/gems/2.7.0/gems/bundler-2.3.22/exe/bundle:36:in `<top (required)>'
from /usr/local/bin/bundle:23:in `load'
from /usr/local/bin/bundle:23:in `<main>'
I, [2022-10-16T02:45:19.901318 #1] INFO -- :
失败
--------------------
Pups::ExecError: cd /var/www/discourse && su discourse -c 'bundle exec rake db:migrate' 执行失败,返回状态为 #<Process::Status: pid 5345 exit 1>
失败位置:/pups/lib/pups/exec_command.rb:112:in `spawn'
执行失败,参数为 {"cd"=>"$home", "hook"=>"db_migrate", "cmd"=>["su discourse -c 'bundle exec rake db:migrate'"]}
7b231533568015c728acd697c416595fedc32cf281ff317d02d88ec8fc19048b
** 引导失败 ** 请向上滚动查看更早的错误信息,可能不止一条。
./discourse-doctor 可能有助于诊断问题。
root@forum:/var/discourse#
版本
我当前使用的版本为:
git show
commit 990519e2373ec32055a7742a407e81f4bd606ed4
Author: Rafael dos Santos Silva <xfalcox@gmail.com>
Date: Tue Aug 3 15:50:04 2021 -0300
Rename master to main
diff --git a/launcher b/launcher
index 626dace..91a39b9 100755