Making the database.yml file work in Rails on OSX
If you're able to connect to Postgres on localhost with psql
, then just add:
host: localhost
to the database.yml
My working configuration is as follows:
development: adapter: postgresql database: database_name host: localhost username: user_name pool: 5 timeout: 5000
So I suppose you need to add host: localhost.
development: adapter: postgresql encoding: utf8 database: name username: hading password: my_db_password host: localhost # not mandatory pool: 5 # not mandatory timeout: 5000 # not mandatory