Postgresでデーターベースに接続できない非エンジニアです。


ドットインストールを見ながら学習中

『Heroku入門』の「Railsアプリケーションを作ろう」の回。
http://dotinstall.com/lessons/basic_heroku/28805

Postgresでデータベースに接続

rails -sでサーバーを起動するも、ページには下記の通りの表示。

could not connect to server: No such file or directory Is the server running locally and accepting connections on Unix domain socket "/tmp/.s.PGSQL.5432"?

ん?これはおかしい。

いろいろ調べてみる。

どうやら、そもそもPostgresでデータベースの作成ができていない?
ターミナルで「psql s」と打つと下記の表示。

psql: could not connect to server: No such file or directory
Is the server running locally and accepting
connections on Unix domain socket "/tmp/.s.PGSQL.5432"?

ググると解決策は出てくるが・・・

どれを適用しても、同じ表示が出てくる。
困っています。

このエントリーとか参考になりそう。
http://taise.hatenablog.com/entry/2013/10/13/162546

もう少し調べてみないと・・・。