Description of problem: If a Ruby app requires a 'pg' gem, in an app with PostgreSQL 8.4 cartridge, the gem cannot be created: Version-Release number of selected component (if applicable): devenv_3458 How reproducible: always Steps to Reproduce: 1. Create a bare Ruby app with PostgreSQL 8.4 cart. rhc app create rubyapp ruby-1.9 postgresql-8.4 2. Edit Gemfile and add 'pg' 3. Commit and push Actual results: Installing pg (0.15.1) with native extensions ....... Gem::Installer::ExtensionBuildError: ERROR: Failed to build gem native extension. /opt/rh/ruby193/root/usr/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. Expected results: gem should be built successfully. Additional info:
The following packages should be installed in all cases. postgresql-server postgresql-libs postgresql-devel postgresql-contrib postgresql-plperl postgresql-plpython postgresql-pltcl
https://github.com/openshift/origin-server/pull/3009
Commit pushed to master at https://github.com/openshift/origin-server https://github.com/openshift/origin-server/commit/7e8a57675f86f9fc9c907e09f4013dce36288f8d Bug 982377 postgresql-devel and other packages should be installed in all supported cases. This led to a Ruby app being unable to build 'pg' gem when PostgreSQL 8.4 (not 9.2) was embedded.
Checked on devenv_3471, issue has been fixed. On server, check the psql package, # rpm -qa|grep postgres |grep devel postgresql-devel-8.4.13-1.el6_3.x86_64 postgresql92-postgresql-devel-9.2.4-7.el6.x86_64 Build ruby 1.9 with gem 'pg', remote: Stopping Ruby cart remote: httpd (no pid file) not running remote: waiting for server to shut down.... done remote: server stopped remote: Postgres stopped remote: Running build on Ruby cart remote: Bundling RubyGems based on Gemfile/Gemfile.lock to repo/vendor/bundle with 'bundle install --deployment' remote: Fetching gem metadata from https://rubygems.org/.... remote: Installing pg (0.12.2) with native extensions ...... remote: .......... remote: .. remote: remote: Using bundler (1.1.4) remote: Your bundle is complete! It was installed into ./vendor/bundle remote: Starting Postgres remote: server starting remote: Postgres started remote: Starting Ruby cart To ssh://51dd00db0ef436089300000b.rhcloud.com/~/git/ruby19.git/ d92a44f..d3211d7 master -> master Move bug to verified.