[chef] Re: Re: Re: Re: ruby-pg gem won't compile


Chronological Thread 
  • From: Marcelo de Moraes Serpa < >
  • To:
  • Subject: [chef] Re: Re: Re: Re: ruby-pg gem won't compile
  • Date: Sun, 25 Nov 2012 17:11:26 -0600

Hi Torben,

Thanks for sharing that! I'll try that out.

Cheers,

- Marcelo.

On Sun, Nov 25, 2012 at 4:37 AM, Torben Knerr < " target="_blank"> > wrote:
Nope, not manually. I have update my postgresql::client recipe like so to install from source when we are on an ubuntu 12.04 omnibus install:

Cheers, Torben


On Sat, Nov 24, 2012 at 6:27 PM, Marcelo de Moraes Serpa < " target="_blank"> > wrote:
@torben, thanks. I have seen this workaround, but  wanted to try something else. Any way to include that in the cook process? Or did you run it manually? I wouldn't want to have to run it manually though, since that pretty much defeats the purpose of Chef.

@edward - that pretty much means I'll have to hack into the postgresql-server recipe right? I'll play with it.

Lastly, does anyone know why this still fails? This is a pretty critical bug for such an important cookbook. 

Thanks!

- Marcelo.

On Sat, Nov 24, 2012 at 10:20 AM, Edward Sargisson < " target="_blank"> > wrote:
It'll be looking for libpq in some set of library paths - but your libpq isn't in one of those paths.
Find libpq - figure out what library paths it's using (it probably tells you at the top) and then put the two together.
You could symlink the library or add a library path when running the configure.

cheers,
Edward



On Fri, Nov 23, 2012 at 9:52 PM, Marcelo de Moraes Serpa < " target="_blank"> > wrote:
Hi list,

I've had some success with Chef (solo) so far, using knife-solo. I could already provision a server with nginx and a jekyll blog...

However, I got lost when it came to setup my rack app (padrino). I'm writing my own recipe, like I did with the jekyll one, and using a couple of other recipes for other components (postgres, runit, unicorn, application, application-ruby).

Everything goes well until I reach the point where bundle install tries to install the ruby-pg gem for the padrino app. It fails with:

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

        /opt/chef/embedded/bin/ruby extconf.rb 
checking for pg_config... yes
Using config values from /usr/bin/pg_config
checking for libpq-fe.h... yes
checking for libpq/libpq-fs.h... yes
checking for pg_config_manual.h... yes
checking for PQconnectdb() in -lpq... no
checking for PQconnectdb() in -llibpq... no
checking for PQconnectdb() in -lms/libpq... no
Can't find the PostgreSQL client library (libpq)
*** 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.

 I have libpq installed, but it just doesn't pick it up. I tried the chef-rvm cookbook (https://github.com/fnichol/chef-rvm), and tried to install rvm on the deploy user (I'm creating a deploy user that the app should be deploy on and ran from), but it also doesn't pick it up, and the gem_package monkeypatch, that is supposed to allow gems to be installed in the rvm ruby, fails.

I'm totally lost. Could someone shed some light on it? I'd be grateful!

Cheers,

- Marcelo.







Archive powered by MHonArc 2.6.16.

§