Exiting
/Users/judyngai/.rvm/gems/ruby-1.9.3-p392/gems/activerecord-3.2.13/lib/active_record /connection_adapters/postgresql_adapter.rb:1216:in `initialize': could not connect to server: No such file or directory (PG::Error)
Is the server running locally and accepting
connections on Unix domain socket "/tmp/.s.PGSQL.5432"?
I read through some posts, somebody suggest adding
host: localhost
to the database.yml file
and then I got this new error
Exiting
/Users/judyngai/.rvm/gems/ruby-1.9.3-p392/gems/activerecord-3.2.13/lib/active_record /connection_adapters/postgresql_adapter.rb:1216:in `initialize': could not connect to server: Connection refused (PG::Error)
Is the server running on host "localhost" (::1) and accepting
TCP/IP connections on port 5432?
could not connect to server: Connection refused
Is the server running on host "localhost" (127.0.0.1) and accepting
TCP/IP connections on port 5432?
can somebody point me to the right direction?
I don't think I have given enough information
when I do
psql --version
psql (PostgreSQL) 9.2.4
which psql
/usr/local/bin/psql
I do have psql installed on my machine
and here is my database.yml file
test:
adapter: postgresql
encoding: unicode
database: pinny_test
pool: 5
username: judyngai
password:
host: localhost
development:
adapter: postgresql
encoding: unicode
database: pinny_development
pool: 5
username: judyngai
password:
host: localhost
I uncommented out the production part.