Ich möchte postgresql für meine Schienen-App in Cloud9 einrichten.PostgreSQL-Server konnte nicht in Cloud9 starten
Der folgende Fehler wurde nach dem Ändern einer Datei angezeigt.
sudo service postgresql start
* Starting PostgreSQL 9.3 database server
* The PostgreSQL server failed to start. Please check the log output:
2016-04-09 23:49:54 UTC LOG: invalid connection type "PostgreSQL"
2016-04-09 23:49:54 UTC CONTEXT: line 1 of configuration file "/etc/postgresql/9.3/main/pg_hba.conf"
2016-04-09 23:49:54 UTC FATAL: could not load pg_hba.conf
...fail!
database.yml
default: &default
adapter: postgresql
encoding: unicode
pool: 5
host: localhost
username: ubuntu
password: password
development:
<<: *default
database: app_development
test:
<<: *default
database: app_test
production:
<<: *default
database: app_production
/etc/postgresql/9.3/main/ pg_hba.conf
PostgreSQL Client Authentication Configuration File
...
# Database administrative login by Unix domain socket
local localhost postgres peer
# TYPE DATABASE USER ADDRESS METHOD
# "local" is for Unix domain socket connections only
local all ubuntu peer
# IPv4 local connections:
host all all 127.0.0.1/32 md5
# IPv6 local connections:
host all all ::1/128 md5
...
Es wäre dankbar, wenn Sie mich beraten könnte wie man diesen Fehler vermeidet.
für Ihre Antwort Vielen Dank haben, @Abhilash. Obwohl ich diesen Befehl ausprobierte, wurde der folgende Fehler angezeigt. 'bash: pg_ctl: Befehl nicht gefunden' Und ich habe 'gem' pg ',' ~> 0.18.2'' in meiner gemfile. – SamuraiBlue
vielleicht müssen Sie das Verzeichnis initialisieren ... Dafür können Sie 'initdb ~/.postgres' und' pg_ctl -D ~/.postgres start' versuchen. Aber ich musste es nie mit Cloud9 machen, bevor ... – Abhilash
Danke Sie für Ihren Kommentar, @Abhilash. Nach dem Entfernen der ersten Zeile in '/ etc/postgresql/9.3/main/pg_hba.conf' wird kein Fehler angezeigt. – SamuraiBlue