Bug 982377 - PostgreSQL cartridge should install postgresql-devel and other packages
PostgreSQL cartridge should install postgresql-devel and other packages
Product: OpenShift Online
Classification: Red Hat
Component: Containers (Show other bugs)
Unspecified Unspecified
unspecified Severity high
: ---
: ---
Assigned To: Hiro Asari
libra bugs
Depends On:
  Show dependency treegraph
Reported: 2013-07-08 16:51 EDT by Hiro Asari
Modified: 2015-05-14 19:23 EDT (History)
3 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2013-07-22 11:22:25 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Hiro Asari 2013-07-08 16:51:19 EDT
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):

How reproducible:

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
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:
Comment 1 Hiro Asari 2013-07-08 16:52:27 EDT
The following packages should be installed in all cases.

Comment 3 openshift-github-bot 2013-07-09 01:11:37 EDT
Commit pushed to master at https://github.com/openshift/origin-server

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.
Comment 4 Meng Bo 2013-07-10 05:47:30 EDT
Checked on devenv_3471, issue has been fixed.

On server, check the psql package,
# rpm -qa|grep postgres |grep devel

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: 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@ruby19-bmeng.dev.rhcloud.com/~/git/ruby19.git/
   d92a44f..d3211d7  master -> master

Move bug to verified.

Note You need to log in before you can comment on or make changes to this bug.