Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8350503
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T08:20:24+00:00 2026-06-09T08:20:24+00:00

I have been trying for some time now to get my Rails development environment

  • 0

I have been trying for some time now to get my Rails development environment back up since I upgraded from Lion to Mountain Lion. The problem is specifically installing the pg-0.14.0 (postgresql) gem.

I have tried the instructions on this post but with no luck. I have tried uninstalling Postgres with Homebrew and then reinstalling it. Nothing is working. If I try to install this gem I recieve this error:

Building native extensions.  This could take a while...
ERROR:  Error installing pg: ERROR: Failed to build gem native extension.

/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/bin/ruby extconf.rb
checking for pg_config... yes 
Using config values from /usr/local/bin/pg_config
checking for libpq-fe.h... yes
checking for libpq/libpq-fs.h... yes
checking for pg_config_manual.h... yes
checking for PQconnectdb() in -lpq... no
checking for PQconnectdb() in -llibpq... no
checking for PQconnectdb() in -lms/libpq... no
Can't find the PostgreSQL client library (libpq)

*** extconf.rb failed ***

Could not create Makefile due to some reason, probably 
lack of necessary libraries and/or headers.  Check the
mkmf.log file for more details.  
You may need configuration options.

Where can I find mkmf.log? Can anyone give me a suggestion on how to install the pg gem again?

update
I was able to locate my mkmf.log file using :

find / -name mkmf.log 2>/dev/null

There are several failed xcrun calls like the one below:

have_library: checking for PQconnectdb() in -llibpq… ——————– no

"xcrun cc -o conftest -I.
-I/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/universal-darwin12.0
-I. -D_XOPEN_SOURCE -D_DARWIN_C_SOURCE -I/usr/local/Cellar/postgresql/9.1.4/include -arch i386 -arch x86_64 -g -Os -pipe -fno-common -DENABLE_DTRACE -fno-common -pipe -fno-common conftest.c -L. -L/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib -L. -arch i386 -arch x86_64 -L/usr/local/Cellar/postgresql/9.1.4/lib -lruby -llibpq -lpthread -ldl -lobjc " ld: library not found for -llibpq clang: error: linker command failed with exit code 1 (use -v to see invocation)

Why am I getting errors when running xcrun? Has anyone seen this?

Thanks!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-09T08:20:25+00:00Added an answer on June 9, 2026 at 8:20 am

    I got this resolved finally. I used RVM to uninstall ruby and re-install ruby version 1.9.3. This allowed me to run ‘bundle install’ without a problem. I checked that all gems where loaded (gem list). However my rails application could not locate the postgres socket file at this point. The same problem is detailed here. Rather than locating the postgresql.conf file, changing permissions on it, and editing it I just uninstalled my current version of Postgres and downloaded the latest One-Click installer from PostGres. When I ran the installer again it detected the other PostGres installation and updated it. This updated the configurations for me and all is well again.

    I hope this might help some other poor rails dev upgrading to Mountain Lion 🙂

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Okay I have been trying to get this to work for some time now.
I've been trying to get this working for some time now. I've seen the
I have been trying to work with NIO SocketChannels for some time now, and
I have been trying to mess with the twitter4j library for some time now,
I have a question that I've been trying to answer for some time now
I have been trying to figure this out for some time. It seems lots
I have been trying to display some basic EXIF data from a photo with
I have been trying all day to get some data properly formatted in a
I have been trying to get my head around some errors I get when
I have been using json.NET successfully in projects for some time now without any

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.