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

  • Home
  • SEARCH
  • 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 6108305
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T14:16:56+00:00 2026-05-23T14:16:56+00:00

pg gem is not specified in the gem file, why won’t it install and

  • 0

pg gem is not specified in the gem file, why won’t it install and why is it even installing at all if it is not in the gem file. I’m trying to use mysql.

The strange thing is that the pg gem is not in my gemfile, so i thought it might be a dependency of another, after researching dependencies on the gem site, pg is shown not to be a dependency of other gems used.

Error Message:

Installing pg (0.8.0) with native extensions c:/Ruby192/lib/ruby/site_ruby/1.9.1/rubygems/installer.rb:543:in `rescue in block in build_e
xtensions': ERROR: Failed to build gem native extension. (Gem::Installer::ExtensionBuildError)

        c:/Ruby192/bin/ruby.exe extconf.rb
ERROR: can't find pg_config.
HINT: Make sure pg_config is in your PATH
*** 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

Gem files will remain installed in c:/Ruby192/lib/ruby/gems/1.9.1/gems/pg-0.8.0 for inspection.
Results logged to c:/Ruby192/lib/ruby/gems/1.9.1/gems/pg-0.8.0/ext/gem_make.out
        from c:/Ruby192/lib/ruby/site_ruby/1.9.1/rubygems/installer.rb:521:in `block in build_extensions'
        from c:/Ruby192/lib/ruby/site_ruby/1.9.1/rubygems/installer.rb:496:in `each'
        from c:/Ruby192/lib/ruby/site_ruby/1.9.1/rubygems/installer.rb:496:in `build_extensions'
        from c:/Ruby192/lib/ruby/site_ruby/1.9.1/rubygems/installer.rb:177:in `install'
        from c:/Ruby192/lib/ruby/gems/1.9.1/gems/bundler-1.0.12/lib/bundler/source.rb:96:in `install'
        from c:/Ruby192/lib/ruby/gems/1.9.1/gems/bundler-1.0.12/lib/bundler/installer.rb:55:in `block in run'
        from c:/Ruby192/lib/ruby/gems/1.9.1/gems/bundler-1.0.12/lib/bundler/spec_set.rb:12:in `block in each'
        from c:/Ruby192/lib/ruby/gems/1.9.1/gems/bundler-1.0.12/lib/bundler/spec_set.rb:12:in `each'
        from c:/Ruby192/lib/ruby/gems/1.9.1/gems/bundler-1.0.12/lib/bundler/spec_set.rb:12:in `each'
        from c:/Ruby192/lib/ruby/gems/1.9.1/gems/bundler-1.0.12/lib/bundler/installer.rb:44:in `run'
        from c:/Ruby192/lib/ruby/gems/1.9.1/gems/bundler-1.0.12/lib/bundler/installer.rb:8:in `install'
        from c:/Ruby192/lib/ruby/gems/1.9.1/gems/bundler-1.0.12/lib/bundler/cli.rb:225:in `install'
        from c:/Ruby192/lib/ruby/gems/1.9.1/gems/bundler-1.0.12/lib/bundler/vendor/thor/task.rb:22:in `run'
        from c:/Ruby192/lib/ruby/gems/1.9.1/gems/bundler-1.0.12/lib/bundler/vendor/thor/invocation.rb:118:in `invoke_task'
        from c:/Ruby192/lib/ruby/gems/1.9.1/gems/bundler-1.0.12/lib/bundler/vendor/thor.rb:246:in `dispatch'
        from c:/Ruby192/lib/ruby/gems/1.9.1/gems/bundler-1.0.12/lib/bundler/vendor/thor/base.rb:389:in `start'
        from c:/Ruby192/lib/ruby/gems/1.9.1/gems/bundler-1.0.12/bin/bundle:13:in `<top (required)>'
        from c:/Ruby192/bin/bundle:19:in `load'
        from c:/Ruby192/bin/bundle:19:in `<main>'

and this is the gemfile:

source :rubygems

gem "rails", ">= 3.0"
gem "rack"
gem "clearance", "0.9.0.rc9"
gem "haml"
gem "high_voltage"
gem "hoptoad_notifier"
gem "will_paginate"
gem "formtastic"
gem "dynamic_form"
gem "mysql"
  • 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-23T14:16:56+00:00Added an answer on May 23, 2026 at 2:16 pm

    The pg gem is used to access PostgreSQL databases from ruby. Check your Gemfile.lock to find out which gem is requiring it as a dependency.

    Please see this Stack Overflow question if you actually need to use the pg gem.

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

Sidebar

Related Questions

I want to use the LinkedIn gem But not the one that I get
We use the gem ruby-recaptcha. It was easy to install and implement in almost
I specified a custom gem repo source for bundler. Some gem dependencies are not
gem install heroku failed with following message and I have tried the solution here
If I download a .gem file to a folder in my computer, can I
When I run gem install <somegem> command the gem utility tries to access my
Does the Pony gem support e-mail with SSL/TLS? I'm trying to (easily) send e-mail
I'm trying to install redmine on a Centos server. I already have PHP and
I have a gem that is not public and not on a publicly accessible
I'm installing ruby on rails on my OS X 10.7 machine and trying 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.