I have been using the default sqlite3 to date, however as I would ultimately like to deploy using postgres I think it would be best to try it out in my development environment rather than launching myself into production untested.
Several points
a) once i have the pg.app running, how do test it?
b) in my config/database.yml file
development:
adapter: postgresql
encoding: unicode
database:
pool: 5
username:
password:
how do i know what the default name of my database is, and how would I got about setting up a user, is this even necessary?
Finally, when i check
which psql
I am told that
/usr/bin/psql
I think that this PATH is incorrect that I will need to modify it, is this so and if so why?
Im sure this is relatively simple but thanks in advance for any help you can offer.
EDIT 1:
During my error googling, and prior attempts, I shot up a similar error to this chap
Repairing Postgresql after upgrading to OSX 10.7 Lion
and thought that it may be a similar problem despite the fact that he is using homebrew?
EDIT 2:
My .bash_profile file
[[ -s “$HOME/.rvm/scripts/rvm” ]] && . “$HOME/.rvm/scripts/rvm” # Load RVM function
export PATH=/usr/local/bin:$PATH
A few things you need to do to get
postgres.appup and running. It looks like you are using the default postgres install with Mac OS X/usr/bin/psqlwhich is good as it should be easy to get this fixed.The main action is to make sure that the path to the
postgres.appis set in yourPATH. Your.profile,.bashrcor.zshrc(whichever you use) should have the following appended to the start of your Path with the following.This will ensure that
postgres.appis used in preference to any other install by prepending it to your current path. You shouldn’t need any other config,The second action is to set up your
database.yml.Postgres.appcomes pre-configured with your local Mac username so you don’t need to add or change it for everything to just work. You also don’t need to specify it indatabase.yml. Development should work with the following:Postgres.appwill auto create the database that has been specified when you migrate the database for the first time. The name of your database is up to you but the convention isapplication_nameunderscoreenvironment.