ruby on rails - Postgresql PG::ConnectionBad + working with Github project -


i new ruby on rails. working on project done halfway programmer. did cloned repository , installed required bundles , gems etc can run development locally. used work time when run rails server , visit localhost:3000

however, today set dual boot ubuntu alongside windows 8.1. then, followed exact same process before install required gems , set environment.

however, time, when run rails server , visit localhost:3000 run following problem:

could not connect server: connection timed out server running on host "xx.xx.xx.xxx" , accepting tcp/ip connections on port 6543?  

this weird, because used work without me configuring on database.yml.

if start new rails project ,

rails new projectname -d postgresql  

it works fine after edited database.yml file correct credential.

so question is, if cloned repository , started collaborate programmer on project, how should set postgresql database me?

thank much.

if want make possible have own local database configuration, consider create database.yml.example file. people think it's bad practice, experience, it's handy.

how make it:

  1. rename database.yml database.yml.example.
  2. commit it
  3. add database.yml .gitignore , commit change.
  4. make copy of database.yml.example , rename database.yml.

now when clone repo, have create own database.yml file .example. have own database configuration.


Comments