petejkim/autoparts

Add detailed install instructions

Closed this issue · 3 comments

For example, I have postgresql running in my box. How do I connect it to a rails app with pg as database?

The standard step of running rake db:create:all results in:

$ FATAL:  role "cpursley" does not exist 
.........
$ Couldn't create database for {"adapter"=>"postgresql", "encoding"=>"unicode", 
  "database"=>"app_test", "pool"=>5, "username"=>"cpursley", "password"=>nil} 

Ok, I think I have it working. Just keep your username empty.

a good way to find out what the database.yml settings should be is to start the db process (parts start postgresql), and then create a new rails app, specifying the db that you want to use (e.g. rails new -d postgresql)

Yep, that's what I did - it's working. This is a great feature, Peter! I'll have to write up a quick blog post about this feature.