我试着设置https://github.com/harrystech/prelaunchr项目。它失败了,因为我似乎有多个Postgres问题。
我最近的问题是:
The data directory was initialized by PostgreSQL version 9.3, which is not compatible with this version 9.4.0.经过这么多不同的方式,我想现在卸载Postgres并设置Postgres 9.3
我怎么能这么做?
谢谢你,本杰明
更新:
我设法换回了9.3分。但是,当我试图启动服务器时:
pg_ctl -D /usr/local/var/postgres -l /usr/local/var/postgres/server.log start我得到:
LOG: could not open temporary-files directory "pg_tblspc/.keep/PG_9.3_201306121/pgsql_tmp": Not a directory
LOG: could not open tablespace directory "pg_tblspc/.keep/PG_9.3_201306121": Not a directory
LOG: database system was interrupted while in recovery at 2015-02-06 01:11:40 PST
HINT: This probably means that some data is corrupted and you will have to use the last backup for recovery.
LOG: database system was not properly shut down; automatic recovery in progress
FATAL: could not open directory "pg_stat": No such file or directory
LOG: startup process (PID 13187) exited with exit code 1
LOG: aborting startup due to startup process failure发布于 2015-02-14 20:47:22
我希望这能帮到你:
mkdir -p /usr/local/var/postgres/{pg_tblspc,pg_twophase,pg_stat_tmp,pg_stat}/.keep发布于 2015-02-16 19:31:06
在您的开发环境中,我建议您做简单/标准的事情。
将config/database.yml文件更改为使用SQLITE。
default: &default
adapter: sqlite3
pool: 5
timeout: 5000
development:
<<: *default
database: db/development.sqlite3您也可能需要更改您的Gemfile,以包括sqlite。IMO,在本地运行postgres是一个不必要的痛苦,除非您正在开发一些postgres特有的特性。这个应用没有,所以省去你自己的麻烦。
https://stackoverflow.com/questions/28362766
复制相似问题