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 6881659
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T05:08:09+00:00 2026-05-27T05:08:09+00:00

I have been trying to install the Ruby PG gem, but kept getting the

  • 0

I have been trying to install the Ruby PG gem, but kept getting the “Failed to build gem native extension.” error.

After sifting through a lot of google results, I tried nearly every recommendation I came across, all without luck. However, I believe I’ve tracked down the source of the problem … Homebrew.

Homebrew installed PostgreSQL 9.0.4, but only with the 32-bit libraries. As I am running Snow Leopard (10.6.8) with XCode 3.26, I need the 64-bit libraries in order to compile everything without library mismatch errors. But I cannot seem to find out how to force Homebrew to install them, even with ARCHFLAGS and ENV set to “-arch x86_64”.

Suggestions, please 🙂

p.s. I found out that I only had 32-bit libraries installed by running:

file /usr/local/Cellar/postgresql/9.0.4/lib/libpq.5.3.dylib

which returned:

/usr/local/Cellar/postgresql/9.0.4/lib/libpq.5.3.dylib: Mach-O dynamically linked shared library i386

Update: re-installed Homebrew, which installed postgresql/9.1.1 and 64-bit shared libraries.

But another problem emerged, while installing the PG gem. For some reason it was looking for ginstall in /opt/local/bin. As I had removed MacPorts, that directory was also removed. I did find this solution:

mkdir -p /opt/local/bin/
sudo ln -s /usr/bin/install /opt/local/bin/ginstall

And now everything seems to be working ….

  • 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-05-27T05:08:10+00:00Added an answer on May 27, 2026 at 5:08 am

    So it looks like my first install, using Homebrew, must have been done with regular Leopard.

    Removing the Homebrew “Cell” directory and all of its contents, running the install script again, then doing “brew install” and “brew update” with all needed packages, got me the latest version of PostgreSQL, with 64-bit developer library.

    And creating the above symbolic link fixed any left over errors from the MacPorts removal.

    Now all is well 🙂

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

Sidebar

Related Questions

I have been trying to install ruby 1.9.2 using rvm but I'm unable to
I'm trying to install bcrypt-ruby on Windows Vista. So far, I have been able
I have been trying to use the ruby-git gem to make commits etc from
I've been going stir crazy trying to install the ruby mysql gem here, and
I'm trying to install passenger: gem1.8 install passenger But i'm getting the error: Building
I have been trying to install ReviewBoard and all looks like it has gone
I have been trying to get around this error for a day now and
I have been trying to install sinatra in a macbook running leopard system, and
I have been trying to install tomcat-6.0.26 on my Mac OS 10.6. I followed
I have been trying to add the Three20 framework to my app. But I

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.