После pg_restore выдается ошибка;PG :: ConnectionBad fe_sendauth: пароль не указан - PullRequest
0 голосов
/ 01 марта 2019

Я только что сделал pg_restore в моем локальном БД с загруженной героем БД (last.dump).И теперь у меня есть ошибка;PG :: ConnectionBad fe_sendauth: пароль не указан.Я добавил имя пользователя и пароль в database.yml, но ничего.Что я должен сделать?

1 Ответ

0 голосов
/ 01 марта 2019

Наконец-то я решил добавить 'username: postgres' и 'password: ***' в общую часть config базы данных.yml;

default: &default
  adapter: postgresql
  encoding: unicode
  # For details on connection pooling, see Rails configuration guide
  # http://guides.rubyonrails.org/configuring.html#database-pooling
  pool: <%= ENV.fetch("RAILS_MAX_THREADS") { 5 } %>
  username: postgres
  password: ***

Не в части разработки;

 development:
  <<: *default
  database: CigBackCount_development

  # The specified database role being used to connect to postgres.
  # To create additional roles in postgres see `$ createuser --help`.
  # When left blank, postgres will use the default role. This is
  # the same name as the operating system user that initialized the database.
  #username: CigBackCount

  # The password associated with the postgres role (username).
  #password:

После внесенных изменений я перезагрузил БД;

pg_ctl reload
...