# 如何检查是什么阻止了rake migrate？

**URL:** <https://meta.discourse.org/t/how-to-check-what-prevents-rake-migrate/258047>\
**Category:** Self-hosting\
**Created:** [2023 年3 月 14 日 02:20 UTC](https://meta.discourse.org/t/how-to-check-what-prevents-rake-migrate/258047 "2023-03-14T02:20:54Z")\
**Posts on this page:** 1\
**Showing post:** 1

<div class="post-metadata">

作者： ![satonotdead](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/satonotdead/32/447830_2.png) [@satonotdead](https://meta.discourse.org/u/satonotdead)\
发布日期： [2023 年3 月 14 日 02:20 UTC](https://meta.discourse.org/t/how-to-check-what-prevents-rake-migrate/258047/1 "2023-03-14T02:20:54Z")

</div>

我正在尝试多站点，我已经安装了第二个实例，并且运行得非常好。

但现在我无法重建。日志显示：

```plaintext
warning " > babel-plugin-debug-macros@0.4.0-pre1" has unmet peer dependency "@babel/core@^7.0.0".
warning "workspace-aggregator-ffab61d1-8b70-4cda-8f38-dde575adc062 > discourse > @uppy/xhr-upload@3.1.0" has incorrect peer dependency "@uppy/core@^3.0.6".

```

```plaintext
PG::UniqueViolation: ERROR: duplicate key value violates unique constraint "idx_category_users_user_id_category_id"
DETAIL: Key (user_id, category_id)=(-4, 9) already exists

```

```plaintext
Pups::ExecError: cd /var/www/discourse & su discourse -c 'bundle exec rake db:migrate' failed with return #<Process::Status: pid 695 exit 1>
Location of failure: /usr/local/lib/ruby/gems/3.2.0/gems/pups-1.1.1/lib/pups/exec_command.rb:117:in `spawn'
exec failed with the params {"cd"=>"$home", "hook"=>"db_migrate", "cmd"=>["su discourse -c 'bundle exec rake db:\nmigrate'"]}
bootstrap failed with exit code 1

```

尝试禁用插件后仍然无法修复。我可以启动应用程序，但无法重建。

---

_[View the full topic](https://meta.discourse.org/t/how-to-check-what-prevents-rake-migrate/258047)._
