# 最新更新由于各种原因无法构建

**URL:** <https://meta.discourse.org/t/latest-update-wont-build-due-to-various-reasons/314875>\
**Category:** Self-hosting\
**Tags:** ai\
**Created:** [2024年七月3日 21:35 UTC](https://meta.discourse.org/t/latest-update-wont-build-due-to-various-reasons/314875 "2024-07-03T21:35:32Z")\
**Posts on this page:** 1\
**Showing post:** 16

<div class="post-metadata">

**Author:** ![RGJ](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/rgj/32/523185_2.png) [@RGJ](https://meta.discourse.org/u/RGJ)\
**Post date:** [2024年七月7日 22:07 UTC](https://meta.discourse.org/t/latest-update-wont-build-due-to-various-reasons/314875/16 "2024-07-07T22:07:46Z")

</div>

> [@RGJ](#):
>
> 我在这里唯一不明白的是为什么这通常_会_起作用

我已经对这个 [Updating AI plugin fails](https://meta.discourse.org/t/updating-ai-plugin-fails/315346) 进行了更多的调查。

我的主要问题是为什么这只会在更新已安装的插件时发生，而在新安装插件时不会发生。答案是，核心会[捕获](https://github.com/discourse/discourse/blob/52a047a8beff58f3c9df57fd5b426e66636efd95/lib/plugin/instance.rb#L578-L583) `PG::UndefinedTable` 异常，但不会捕获 `PG:UndefinedColumn`。如果插件已安装，则异常是后者；如果插件是全新的，则异常是前者。

---

_[View the full topic](https://meta.discourse.org/t/latest-update-wont-build-due-to-various-reasons/314875)._
