更新失败;“bundle exec rake assets:precompile”执行失败

166:M 2020 年 4 月 9 日 19:22:49.160 * 退出前正在保存最终的 RDB 快照。
166:M 2020 年 4 月 9 日 19:22:49.183 * 数据库已保存到磁盘
166:M 2020 年 4 月 9 日 19:22:49.183 # Redis 现在准备退出,再见...


失败
--------------------
Pups::ExecError: 执行 cd /var/www/discourse && su discourse -c 'bundle exec rake assets:precompile' 失败,返回状态为 #<Process::Status: pid 12966 exit 1>
失败位置:/pups/lib/pups/exec_command.rb:112:in `spawn'
执行失败,参数为 {"cd"=>"$home", "hook"=>"assets_precompile", "cmd"=>                  ["su discourse -c 'bundle exec rake assets:precompile'"]}
5148cdd01588a9ec15d9a282a502da071bb6863d127112ea0d1526177593c6ae
** 引导失败 ** 请向上滚动并查找更早的错误消息,可能不止一条。
./discourse-doctor 可能有助于诊断问题。
root@lab:/var/discourse# docker update

/admin/upgrade#/ 的截图:Image 2020-04-09 at 3.58.11 PM

有任何建议吗?

1 个赞

能否拉取最新版本后再次尝试构建?最近的几次提交可能引发了问题。

1 个赞

我刚刚运行了:

cd /var/discourse
git pull
./launcher rebuild app

结果:

166:M 09 Apr 2020 21:28:03.463 * 正在退出前保存最终的 RDB 快照。
166:M 09 Apr 2020 21:28:03.494 * 数据库已保存到磁盘
166:M 09 Apr 2020 21:28:03.494 # Redis 现在准备退出,再见...


失败
--------------------
Pups::ExecError: cd /var/www/discourse && su discourse -c 'bundle exec rake assets:precompile' 执行失败,返回状态码为 #<Process::Status: pid 12955 exit 1>
失败位置:/pups/lib/pups/exec_command.rb:112:in `spawn'
执行失败,参数为 {"cd"=>"$home", "hook"=>"assets_precompile", "cmd"=>["su discourse -c 'bundle exec rake assets:precompile'"]}
e9cd09967fbf566b05f3ecedf900f2884c879e55e75350475ac8e28599439cfd
** 启动失败 ** 请向上滚动并查找更早的错误信息,可能不止一条。
./discourse-doctor 可能有助于诊断问题。

You need to do what the message says.

2 个赞

我发现了以下问题:
1.)

0:  aws-sdk-s3 (1.61.2) from /var/www/discourse/vendor/bundle/ruby/2.6.0/specifications/aws-sdk-s3-1.61.2.gemspec
Bundle complete! 127 Gemfile dependencies, 158 gems now installed.
Gems in the groups test and development were not installed.
Bundled gems are installed into `./vendor/bundle`

2.)

rake aborted!
Sprockets::FileNotFound: couldn't find file 'jquery.putcursoratend.js' with type 'application/javascript'

3.)

167:M 09 Apr 2020 21:43:12.897 # Redis is now ready to exit, bye bye...
2020-04-09 21:43:12.914 UTC [50] LOG:  database system is shut down


FAILED
--------------------
Pups::ExecError: cd /var/www/discourse && su discourse -c 'bundle exec rake assets:precompile' failed with return #<Process::Status: pid 12968 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 assets:precompile'"]}
8332d3e8c049ac2f88e9fa9c0cc00acf93450485f515126bef7f87a61bd13d52
** 启动失败 ** 请向上滚动查看更早的错误信息,可能不止一条。
运行 ./discourse-doctor 可能有助于诊断问题。
2 个赞

您是否有任何非官方的自定义插件?如果有,请将其注释掉。

1 个赞

我刚刚执行了:

      - git clone https://github.com/discourse/docker_manager.git
      - git clone https://github.com/angusmcleod/discourse-custom-wizard.git

这是一个孤立的事件,问题出在 Custom Wizard 插件上。一旦移除了 Custom Wizard,我就能拉取最新的 Discourse 版本了。

看起来 @angus@pmusaraj 正在着手解决该问题:
Custom Wizard Plugin 🧙 - #459

附言 - @pmusaraj,我刚刚安装了你的 Zoom 插件,这正是我几个月来一直想要的。感谢你不断的创新。

7 个赞

谢谢你提醒我哪个插件出了问题。不然我还得一个个去排查。

3 个赞

这是我希望看到的一个功能,但我认为在这类框架应用中难以实现:

一个单一的管理员开关,用于禁用/启用所有插件。

这将使每个人的系统管理员在出现问题时的工作更加轻松。如果管理员能够在无需重新构建的情况下关闭所有插件,将有助于用户调试,他们可以轻松判断“这是一个插件问题”。

1 个赞

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.