【问题标题】:My ubuntu user cannot access the database created in postgres for rails by the dev user我的 ubuntu 用户无法访问 dev 用户在 postgres 中为 rails 创建的数据库
【发布时间】:2018-02-11 00:35:18
【问题描述】:

我在 postgres 中使用 db 用户创建了一个新的 rails 项目,并为该用户提供了创建 db 的足够权限。

成功运行 rails db:create & db:migrate 后,当我尝试访问网页时,我的 ubuntu 用户“ubuntu_user”无法访问数据库。

在 rails 4.2 中,之前的项目 (webrick webserver) 没有发生类似的情况,目前该项目在带有 puma 网络服务器的 rails 5 上

请指教。 谢谢

注意: 我在 puma 网络服务器终端中得到了这些行

Started GET "/" for 127.0.0.1 at 2017-09-02 01:27:20 +0300 Started GET
"/" for 127.0.0.1 at 2017-09-02 01:27:20 +0300    (1.9ms)  SELECT
"schema_migrations"."version" FROM "schema_migrations" ORDER BY
"schema_migrations"."version" ASC    (13.5ms)  SELECT
"schema_migrations"."version" FROM "schema_migrations" ORDER BY
"schema_migrations"."version" ASC

【问题讨论】:

    标签: ruby-on-rails ruby postgresql ubuntu puma


    【解决方案1】:

    原来 puma 服务器挂了,我不得不杀死它然后重新开始。

    重启后没有报错。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2012-02-17
      • 2014-06-16
      • 2015-07-02
      • 1970-01-01
      • 2019-03-15
      • 2023-04-09
      • 2013-02-16
      • 2013-10-01
      相关资源
      最近更新 更多