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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T19:37:30+00:00 2026-06-04T19:37:30+00:00

I have a Ruby on Rails application and am just starting to deploy it

  • 0

I have a Ruby on Rails application and am just starting to deploy it to Heroku.

The Heroku quick start guide says to include the pg gem for your database on production. OK, this came up the last time I deployed to Heroku, and I solved it with the following:

group :production do
  gem 'pg'
end

However, this time around, when I try to “bundle install” or “bundle update” my app locally, it is for some reason trying to install pg, even though I explicitly told it to only use pg in production! Any reason why this is, and what can I do to fix it? Thanks!

Installing pg (0.13.2) with native extensions 
Gem::Installer::ExtensionBuildError: ERROR: Failed to build gem native extension.

        /Users/user/.rvm/rubies/ruby-1.9.3-p194/bin/ruby extconf.rb 
checking for pg_config... no
No pg_config... trying anyway. If building fails, please try again with
 --with-pg-config=/path/to/pg_config
checking for libpq-fe.h... no
Can't find the 'libpq-fe.h header
*** 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.
  • 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-04T19:37:32+00:00Added an answer on June 4, 2026 at 7:37 pm

    Try running

    bundle install --without production
    

    This will prevent production gems being bundled, and the setting will stick for normal bundle commands until the next time your use the --without parameter.

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

Sidebar

Related Questions

I have to to deploy a Ruby on Rails application to an tomcat application
I'm starting to develop a small application in Ruby On Rails. I have a
I have a ruby-on-rails application that wishes to utilise the tumblr gem for adding
I have just installed paperclip into my ruby on rails blog application. Everything is
Just starting to learn Ruby on Rails. I'm using RoR 3. I have read
I'm a Ruby-on-Rails newbie, just starting out. I have an MVC called account_types, generated
I have a ruby on rails application and it would be nice to see
I have Ruby on Rails 3.1 application and i use for Sphinx + Thinking
I have created a table in my Ruby on Rails application that I am
I have created a blog application using Ruby on Rails which includes the ability

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.