Project

General

Profile

bundle install error

Added by Panupat Chong almost 12 years ago

Hi.

I've been following the CentOS howto guide but I got stuck at bundle install command.

An error occured while installing pg (0.13.2), and Bundler cannot continue.
Make sure that `gem install pg -v '0.13.2'` succeeds before bundling.

I tried to run the gem install pg on its own and it was installed without problem.

Would appreciate any help. Thanks!


Replies (12)

RE: bundle install error - Added by Alex A almost 12 years ago

bundle install --without development test postgresql

RE: bundle install error - Added by Panupat Chong almost 12 years ago

But I'm planning to use postgresql. Would it still work if I install it without postgresql?

RE: bundle install error - Added by Alex A almost 12 years ago

What database do u use in redmine?

RE: bundle install error - Added by Panupat Chong almost 12 years ago

I want to use postgresql since it's the one we're already using for everything else here :O Can't start using it with redmine yet tho.

RE: bundle install error - Added by Alex A almost 12 years ago

Is gem pg installed? If yes, there no problem to use bundler.

RE: bundle install error - Added by Panupat Chong almost 12 years ago

It is. The error message keeps giving me this line

= Make sure that `gem install pg -v '0.13.2'` succeeds before bundling.

I ran that command gem install pg -v '0.13.2' many many times and it went through just fine everytime. But still the error message shows all the same.

RE: bundle install error - Added by Alex A almost 12 years ago

Can u post full log of bundle install --without development test command?

RE: bundle install error - Added by Ryan W almost 12 years ago

I've also come to a halt because of the pg -v 0.13.2 error, so I am curious how this turns out.

UPDATE
Within my error was "Your PostgreSQL database is too old, try an older gem" so I installed pg -v 0.12.2 after removing every instance of pg 0.13.2 I could find. On bundle install the error still remains for pg -v 0.13.2, and it appears that pg 0.13.2 is persisting from somewhere. Local gem perhaps?

RE: bundle install error - Added by Panupat Chong almost 12 years ago

Here's my full log. A bit long.

[root@riffhub redmine]# bundle install --without development test
Fetching gem metadata from http://rubygems.org/.......
Fetching gem metadata from http://rubygems.org/.......
Using rake (0.8.3)
Using RedCloth (4.2.9)
Using activesupport (2.3.14)
Using rack (1.1.0)
Using actionpack (2.3.14)
Using actionmailer (2.3.14)
Using activerecord (2.3.14)
Using activeresource (2.3.14)
Using coderay (1.0.6)
Using fastercsv (1.5.4)
Using hoe (3.0.3)
Using i18n (0.4.2)
Using mysql (2.8.1)
Using net-ldap (0.3.1)
Installing pg (0.13.2) with native extensions
Gem::Installer::ExtensionBuildError: ERROR: Failed to build gem native extension.

/usr/local/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.

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=/usr/local/bin/ruby
--with-pg
--without-pg
--with-pg-dir
--without-pg-dir
--with-pg-include
--without-pg-include=${pg-dir}/include
--with-pg-lib
--without-pg-lib=${pg-dir}/lib
--with-pg-config
--without-pg-config
--with-pg_config
--without-pg_config

Gem files will remain installed in /usr/local/lib/ruby/gems/1.8/gems/pg-0.13.2 for inspection.
Results logged to /usr/local/lib/ruby/gems/1.8/gems/pg-0.13.2/ext/gem_make.out
An error occured while installing pg (0.13.2), and Bundler cannot continue.
Make sure that `gem install pg -v '0.13.2'` succeeds before bundling.

Just saw it now . . . it says I have no pg_config. Any suggestions how I can fix that? Thanks

RE: bundle install error - Added by Alex A almost 12 years ago

Log says that it can not find development header libpq-fe.h. You must install libpq development files (headers, sources etc.) or indicate (--with-pg-include) where files are, if they were installed.

RE: bundle install error - Added by Panupat Chong almost 12 years ago

Thanks. So it's really the libpg. After I installed it the installation went through without problem :) Will see how well it works.

I think the command was
yum install postgresql-devel
but I'm not sure.

RE: bundle install error - Added by hiep lq over 11 years ago

in my environment: centos 6.3, postgresql 9.2
i install full postgresql (include postgresql-devel) and i still this error (with pg 0.14.1).
i fix below:

step 1 run comand (fix path to pg_config for your environment):
gem install pg -- --with-pg-config="/usr/pgsql-9.2/bin/pg_config"
step 2 run bundle install:
bundle install --without development test rmagick sqlite mysql

    (1-12/12)