Library not loaded: /usr/local/lib/libpq.5.4.dylib

前端 未结 6 1706
轻奢々
轻奢々 2021-01-01 08:54

I am working on a rails app.
Installed Postgresql using postgresql-9.1.2-1-osx.dmg
Installed pg gem.
Then when I executed rake db:create getting the

6条回答
  •  野趣味
    野趣味 (楼主)
    2021-01-01 09:27

    this is not a direct answer to the question but can arise frequently

    Two additional cases that might be of interest if you have upgraded PostgreSQL with homebrew:

    1. you have proceeded in the past to some pruning of gem versions
    2. your application is older and cannot take a recent version of pg (I have a rails 2 app failing with pg 0.17 and nearly killing the server: the mkmr.log increases exponentially ...try 200GB! )

    you may actually have numerous versions of pg to rely upon

    when you run

    gem uninstall pg
    

    if you have more than one version, the system will ask which version you wish to delete. But that list may be useful to you! As an alternative to awenkhh's answer you may stop there and reset your gems to an acceptable version

提交回复
热议问题