Created
May 9, 2013 11:30
-
-
Save lushone/5546946 to your computer and use it in GitHub Desktop.
Fix pg gem to work with PostgreSQL 9.2
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
cd /Library/Ruby/Gems/1.8/gems/pg-0.13.2/lib/ | |
otool -L pg_ext.bundle | |
> libpq.5.dylib (compatibility version 5.0.0, current version 5.4.0) | |
# Notice that libpq.5.dylib doesn't use an absolute path like the other libs in pg_ext.bundle. The system can't find it. You need to change where it looks for libpq.5.dylib. | |
install_name_tool -change libpq.5.dylib /Library/PostgreSQL/9.2/lib/libpq.5.dylib pg_ext.bundle | |
# Note: Use the absolute path that applies to your system. I used what it was for my system. | |
# Now run: | |
otool -L pg_ext.bundle | |
# Notice what libpq.5.dylib points to now: | |
> /Library/PostgreSQL/9.2/lib/libpq.5.dylib (compatibility version 5.0.0, current version 5.4.0) | |
# The pg gem should be happy now. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment