我会把它作为我的备忘录。

环境

操作系统 macOS 12.3.1
红宝石 3​​.0.1
导轨 6.1.6
PostgreSQL 14.5

背景

$ rails db:create

当我运行它时,会出现以下错误。

ActiveRecord::ConnectionNotEstablished: could not connect to server: No such file or directory
        Is the server running locally and accepting
        connections on Unix domain socket "/tmp/.s.PGSQL.5432"?

认为“Postgres 没有运行(这是一个即时杀戮)”

$ brew services start postgresql@14

当我执行 orz

Bootstrap failed: 5: Input/output error
Try re-running the command as root for richer errors.
Error: Failure while executing; `/bin/launchctl bootstrap gui/501 /Users/username/Library/LaunchAgents/homebrew.mxcl.postgresql@14.plist` exited with 5.

为什么bootstrap

解决方案

毕竟,它是通过停止 Postgres 并重新启动它来解决的。

$ brew services stop postgresql@14
$ brew services start postgresql@14

我还不知道其中的原因,但我希望这篇文章至少可以帮助一个人。


原创声明:本文系作者授权爱码网发表,未经许可,不得转载;

原文地址:https://www.likecs.com/show-308628161.html

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-02-20
  • 2022-12-23
  • 2021-10-26
猜你喜欢
  • 2021-11-05
  • 2021-08-31
  • 2022-12-23
  • 2022-12-23
  • 2021-11-14
  • 2021-05-29
  • 2022-12-23
相关资源
相似解决方案