fe sendauth: Nie podano hasła

Baza Danych.yml:

# SQLite version 3.x
#   gem install sqlite3
#
#   Ensure the SQLite 3 gem is defined in your Gemfile
#   gem 'sqlite3'
development:
  adapter: postgresql
  encoding: utf8
  database: sampleapp_dev  #can be anything unique
  #host: localhost
  #username: 7stud
  #password: 

  #adapter: sqlite3
  #database: db/development.sqlite3
  pool: 5
  timeout: 5000

# Warning: The database defined as "test" will be erased and
# re-generated from your development database when you run "rake".
# Do not set this db to the same as development or production.
test:
  adapter: postgresql
  encoding: utf8
  database: sampleapp_test  #can be anything unique
  #host: localhost
  #username: 7stud
  #password: 
  #adapter: sqlite3
  #database: db/test.sqlite3
  pool: 5
  timeout: 5000

production:
  adapter: postgresql
  database: sampleapp_prod   #can be anything unique
  #host: localhost
  #username: 7stud
  #password: 
  #adapter: sqlite3
  #database: db/production.sqlite3
  pool: 5
  timeout: 5000

Pg_hba.conf:

# TYPE  DATABASE        USER            ADDRESS                 METHOD

# "local" is for Unix domain socket connections only
local   all             all                                     trust
# IPv4 local connections:
host    all             all             127.0.0.1/32            trust
# IPv6 local connections:
host    all             all             ::1/128                 trust
# Allow replication connections from localhost, by a user with the
# replication privilege.
#local   replication     postgres                                md5
#host    replication     postgres        127.0.0.1/32            md5
#host    replication     postgres        ::1/128                 md5

Zmieniłem metodę w pierwszych trzech liniach z md5 na trust, ale nadal dostaję błąd.

I bez względu na to, jakie kombinacje rzeczy próbuję w bazie danych.yml, kiedy robię:

~/rails_projects/sample_app4_0$ bundle exec rake db:create:all

Zawsze dostaję błąd:

Fe_sendauth: Nie podano hasła

Śledziłem ten tutorial, aby uzyskać rzeczy konfiguracja:

Https://pragtob.wordpress.com/2012/09/12/setting-up-postgresql-for-ruby-on-rails-on-linux

Mac OSX 10.6.8
PostgreSQL 9.2.4 installed via enterpriseDB installer
Install dir: /Library/PostgreSQL/9.2
Author: 7stud, 2013-08-01

1 answers

Po wprowadzeniu zmian w plikach pg_hba.conf LUB postgresql.conf, klaster musi zostać przeładowany, aby odebrać zmiany.

Z linii poleceń: pg_ctl reload

From within a db (as superuser): select pg_reload_conf();

Z PGAdmin: kliknij prawym przyciskiem myszy nazwę db, wybierz "Reload Configuration"

Uwaga: przeładowanie nie jest wystarczające dla zmian, takich jak włączenie archiwizacji, zmiana shared_buffers, itp -- te wymagają ponownego uruchomienia klastra.

 49
Author: bma,
Warning: date(): Invalid date.timezone value 'Europe/Kyiv', we selected the timezone 'UTC' for now. in /var/www/agent_stack/data/www/doraprojects.net/template/agent.layouts/content.php on line 54
2017-05-28 03:32:18