ruby on rails - Postgres - FATAL: database files are incompatible with server -


i developing rails4-app postgresql , worked fine. after restarting macbook pro unable start database server:

could not connect server: no such file or directory server running locally , accepting connections on unix domain socket "/tmp/.s.pgsql.5432"? 

i checked logs , following line appears on , on again:

fatal:  database files incompatible server detail:  data directory initialized postgresql version 9.2, not compatible version 9.0.4. 

9.0.4 version came preinstalled on mac, 9.2[.4] version installed via homebrew. mentioned, used work before restart, can't compiling issue. re-ran initdb /usr/local/var/postgres -e utf8 , file still exists.

unfortunately, pretty new postgres, appreciated.

if looking nuclear option (delete data , fresh database), can do:

rm -rf /usr/local/var/postgres && initdb /usr/local/var/postgres -e utf8

and you'll need rake db:setup , rake db:migrate rails app setup again.


Comments

Popular posts from this blog

javascript - DIV "hiding" when changing dropdown value -

Does Firefox offer AppleScript support to get URL of windows? -

android - How to install packaged app on Firefox for mobile? -