找不到libpq5.6.dylib,如何安装5.7?

时间:2015-01-28 19:59:26

标签: ruby-on-rails ruby postgresql libpq

我运行rake db:create并找不到libpq。我有5和5.7 ..如何升级postgres使用5.7?

rake db:create

rake aborted!
LoadError: dlopen(/Users/me/.rvm/gems/ruby-2.2.0-preview1/extensions/x86_64-darwin-14/2.2.0/pg-0.17.1/pg_ext.bundle, 9): Library not loaded: /usr/local/lib/libpq.5.6.dylib
  Referenced from: /Users/me/.rvm/gems/ruby-2.2.0-preview1/extensions/x86_64-darwin-14/2.2.0/pg-0.17.1/pg_ext.bundle
  Reason: image not found - /Users/me/.rvm/gems/ruby-2.2.0-preview1/extensions/x86_64-darwin-14/2.2.0/pg-0.17.1/pg_ext.bundle

    ls /usr/local/lib/libpq.5.
    libpq.5.7.dylib  libpq.5.dylib

1 个答案:

答案 0 :(得分:0)

尝试重新安装pg Ruby Gem(使用$ gem uninstall pg && gem install pg)。这应该使用你的新版Postgres开发库重新编译gem。