I used brew to install postgresql, and also used install the pg Gem along with it. However, when i try running createuser databasename i get this error:
createuser: could not connect to database postgres: FATAL: could not open relation mapping file "global/pg_filenode.map": No such file or directory
I've tried completely uninstalling from brew, the gem and the /usr/local/var/postgres file and still doesn't work after i do a reinstall(strange thing is, when i do a reinstall and try to initdb, it says the file is not empty?)
a bit of google search and i found some solutions but i have no idea how to do them
- Remove and re-add the launch agent
- Kill the processes for 9.0.3
- Initialize the db initdb /usr/local/var/postgres
- Restart my computer
the last 2 instructions is pretty straight forward, but i have no idea how to do the first 2
any suggestions?