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