接收 DRb::DRbRemoteError: FATAL: "base/<number>" 在构建设计装置时不是有效的数据目录

问题描述

问题:如何清除此错误

DETAIL:  File "base/41804/PG_VERSION" is missing.
 (ActiveRecord::ConnectionNotEstablished)

在为 Devise 构建固定装置时,我添加

  email: user_one@example.com
  confirmed_at: <%= Time.zone.Now %>
  encrypted_password: <%= Devise::Encryptor.digest(User,'password') %>

到 users.yml 文件

当我运行 rails test 时,出现主题错误

错误代码片段是:

rails t
Running via Spring preloader in process 92827
Run options: --seed 7694

# Running:

E

Error:
StaticPagesControllerTest#test_should_get_home:
DRb::DRbRemoteError: FATAL:  "base/41804" is not a valid data directory
DETAIL:  File "base/41804/PG_VERSION" is missing.
 (ActiveRecord::ConnectionNotEstablished)

错误结束时,rails test 将我指向 rails test test/controllers/static_pages_controller_test.rb:4

文件包含:

#test/controllers/static_pages_controller_test.rb:4
require "test_helper"

class StaticPagesControllerTest < Actiondispatch::IntegrationTest
  test "should get home" do
    get root_path
    assert_response :success
  end
end

我放弃了测试数据库并重新开始,但没有运气。 我向 PG 点了点头,但我没有在那里闲逛,而是在这里提交了问题。

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)