Tell me more ×
Stack Overflow is a question and answer site for professional and enthusiast programmers. It's 100% free, no registration required.

I recently re-installed postgres using postgres.app and now my rails app is not able to find the database. I am getting the following error:

dlopen(/Users/username/.rvm/gems/ruby-2.0.0-p0/gems/pg-0.15.1/lib/pg_ext.bundle, 9): Library not loaded: /Users/username/.rvm/lib/libpq.5.5.dylib
Referenced from: /Users/username/.rvm/gems/ruby-2.0.0-p0/gems/pg-0.15.1/lib/pg_ext.bundle
Reason: image not found - /Users/username/.rvm/gems/ruby-2.0.0-p0/gems/pg-0.15.1/lib/pg_ext.bundle

It seems like this problem stems from the fact that I ran

brew uninstall postgresql

before installing postgres.app. I was wondering how to tell my already existing rails app to find the database. Thanks

EDIT:

here is my database.yml file:

development:
     adapter: postgresql
     encoding: unicode
     database: *********
     pool: 5
     host: localhost

And also, postgres.app is running, the elephant is hanging out.

share|improve this question
Can you please paste your database.yml file and confirm that postgres.app is running? On a Mac, there will be a black elephant in the top right of the screen when postgres.app is running. Check the port that postgres.app is running on by clicking the black elephant. – Powers yesterday
Have you rebuilt the pg gem? – Philip Hallstrom yesterday
I edited my question – user2136807 47 secs ago
add comment (requires an account with 50 reputation)

Know someone who can answer? Share a link to this question via email, Google+, Twitter, or Facebook.

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.