私は最近homebrewとpostgresを再インストールしなければならなかったので、postgresはレールで動作しません。Postgres sh:/usr/local/var/postgres/server.log:そのようなファイルやディレクトリはありません
レールSを実行しようとしたときに最初に、私はこれを取得:
/Users/lee/.rvm/gems/[email protected]/gems/activerecord-3.2.6/lib/active_record/connection_adapters/postgresql_adapter.rb:1206:in `initialize': could not connect to server: Connection refused (PG::Error)
だから私はpostgresのを起動してみて、私はこれを取得:
pg_ctl -D /usr/local/var/postgres -l /usr/local/var/postgres/server.log start
server starting
sh: /usr/local/var/postgres/server.log: No such file or directory
Postgresはこのために実行されていることが表示されます:
ps aux | grep postgreslee 1099 0.3 0.0 2425480 188 s000 R+ 5:48PM 0:00.01 grep postgres
なぜ私はそれを稼働させることができないのか、ここでは完全に迷っています。
おそらく、新しいpostgresを別のディレクトリにインストールしたことがあります。まず、-lフラグ+ logfilenameを省略して起動するか試してみてください。 BTW:postgres.confにログファイルを指定することもできます。ディレクトリ "/ usr/local/var/postgres"には何が入っていますか?それは存在するのだろうか?所有者は誰ですか? – wildplasser