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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T10:50:05+00:00 2026-05-23T10:50:05+00:00

I want to build a Rails 3 app for Heroku. They use Postgres as

  • 0

I want to build a Rails 3 app for Heroku.
They use Postgres as their db so I installed postgres 9.0 via MacPorts.
Now I need a postgres gem and the consensus is that for performance reasons
you want the pg gem. However I’m completely baffled by the errors I’m getting
when I try and install pg via gem install under rvm.

I have been very explicit by specifying where all the postgres directories
are to be found but still am unable to complete the install:

$ env ARCHFLAGS='-arch x86_64' gem install pg -- \
   --with-pg-config=/opt/local/var/db/postgresql90/defaultdb/postgresql.conf \
   --with-pg-include=/opt/local/include/postgresql90/ \
   --with-pg-lib=/opt/local/lib/postgresql90/

Using config values from /opt/local/var/db/postgresql90/defaultdb/postgresql.conf
*** 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.

Provided configuration options:
    --with-opt-dir
    --without-opt-dir
    --with-opt-include
    --without-opt-include=${opt-dir}/include
    --with-opt-lib
    --without-opt-lib=${opt-dir}/lib
    --with-make-prog
    --without-make-prog
    --srcdir=.
    --curdir
    --ruby=/Users/guy/.rvm/ruby-1.9.2-p136/bin/ruby
    --with-pg
    --without-pg
    --with-pg-dir
    --without-pg-dir
    --with-pg-include=${pg-dir}/include
    --with-pg-lib=${pg-dir}/lib
    --with-pg-config
extconf.rb:24:in ``': Exec format error - /opt/local/var/db/postgresql90/defaultdb/postgresql.conf --includedir (Errno::ENOEXEC)
    from extconf.rb:24:in `<main>'

Anyone got any ideas?
I’m baffled.
Guy

  • 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-23T10:50:06+00:00Added an answer on May 23, 2026 at 10:50 am

    I think your problem is right here:

    --with-pg-config=/opt/local/var/db/postgresql90/defaultdb/postgresql.conf
    

    The --with-pg-config switch probably wants to know where the pg_config script is rather than were postgresql.conf is. You should have a pg_config script somewhere under /opt/local/bin (probably), it should produce a big pile of stuff like this:

    BINDIR = /Users/mu/Developer/Cellar/postgresql/9.0.1/bin
    DOCDIR = /Users/mu/Developer/Cellar/postgresql/9.0.1/share/doc
    HTMLDIR = /Users/mu/Developer/Cellar/postgresql/9.0.1/share/doc
    INCLUDEDIR = /Users/mu/Developer/Cellar/postgresql/9.0.1/include
    PKGINCLUDEDIR = /Users/mu/Developer/Cellar/postgresql/9.0.1/include
    INCLUDEDIR-SERVER = /Users/mu/Developer/Cellar/postgresql/9.0.1/include/server
    LIBDIR = /Users/mu/Developer/Cellar/postgresql/9.0.1/lib
    PKGLIBDIR = /Users/mu/Developer/Cellar/postgresql/9.0.1/lib
    ...
    

    when you run it. The pg_config script tells you (or whoever is asking) where the various header files and libraries are and which compiler flags are needed.

    The “Exec format error” error message is the give away. That sounds like you’re trying to execute something that the OS doesn’t know how to execute and I wouldn’t expect OSX to know how to execute some arbitrary configuration file.

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

Sidebar

Related Questions

I am having a browser-oriented web app build on Rails (3.1). I want to
I have a rails app I want to run on heroku to test. I
I want to build a rails request with 2 models. I think it's quite
I'm a newcomer to Rails. I want to build a simple form that determines
i want build a photography app with effects . e.g. old images with brown
I want build a sketch pad app on iPhone, I assume that this type
I want to build a lightweight linux configuration to use for development. The first
I want to build an executable to distribute to people without python installed on
I am trying to build a rails app that's basically just a text-editor (with
I want to build a cms from scratch on rails.... I want it to

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.