3
的Mac OS X獅子10.7.4改變PostgreSQL的版本將不會從默認
的psql --version - > PSQL(PostgreSQL系統)9.0.5
我想安裝最新版本,並運行我的Rails應用程序用它。
我
brew install postgresql
it is installed here: /usr/local/Cellar/postgresql/9.1.4
initdb /usr/local/var/postgres
pg_ctl -D /usr/local/var/postgres -l /usr/local/var/postgres/server.log start
我得到:
pg_ctl: another server might be running; trying to start server anyway
運行的Postgres --version
-> 9.1.4
的Postgres -p 5433
postgres does not know where to find the server configuration file.
You must specify the --config-file or -D invocation option or set the PGDATA environment variable.
我改變了端口,並再次運行服務器,但它沒有改變。你可以給我一些關於如何做到這一點的細節。 – Benamir
@Beamon ...你是否改變了你的rails設置來連接到'database.yml'中的新端口? –
我甚至沒有連接到9.1.4實例......我將conf文件更改爲端口號#5433並保存後。啓動pg實例不會連接到正確的實例。在我擔心我的database.yml和rails配置之前,我不需要連接到正確的實例嗎? – Benamir