Skip to content

Commit 26fe6a1

Browse files
authored
Use --platform ruby to ensure we install the source based pg gem (#791)
The upstream pg ruby gem has started including pre-complied pg gems which do not work on EL8 due to the fact they were compiled on an Ubuntu platform that has a newer glibc. By using `--platform ruby` [1], this will force the installation using the source which is what this cookbook expects. In addition, make sure we test on EL8. [1] https://github.com/ged/ruby-pg?tab=readme-ov-file#source-gem Signed-off-by: Lance Albertson <[email protected]>
1 parent 5e9a15c commit 26fe6a1

File tree

3 files changed

+7
-4
lines changed

3 files changed

+7
-4
lines changed

.github/workflows/ci.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,11 @@ jobs:
2222
strategy:
2323
matrix:
2424
os:
25+
- "almalinux-8"
2526
- "almalinux-9"
27+
- "rockylinux-8"
2628
- "rockylinux-9"
29+
- "oraclelinux-8"
2730
- "oraclelinux-9"
2831
- "centos-stream-9"
2932
- "amazonlinux-2023"
@@ -50,8 +53,6 @@ jobs:
5053
- "initdb-locale-17"
5154
- "server-install-os"
5255
exclude:
53-
- os: "centos-7"
54-
suite: "server-install-os"
5556
- os: "amazonlinux-2023"
5657
suite: "access-15"
5758
- os: "amazonlinux-2023"

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@ This file is used to list changes made in the last 3 major versions of the postg
44

55
## Unreleased
66

7+
- Use `--platform ruby` to ensure we install the source based pg gem
8+
79
## 12.3.1 - *2025-07-17*
810

911
- Correct createdb column name from `rolecreatedb` to `rolcreatedb`

libraries/sql/_connection.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,9 +56,9 @@ def postgresql_devel_path(suffix = nil, version: installed_postgresql_major_vers
5656
def pg_gem_build_options
5757
case node['platform_family']
5858
when 'rhel', 'amazon'
59-
"-- --with-pg-include=#{postgresql_devel_path('include')} --with-pg-lib=#{postgresql_devel_path('lib')}"
59+
"--platform ruby -- --with-pg-include=#{postgresql_devel_path('include')} --with-pg-lib=#{postgresql_devel_path('lib')}"
6060
when 'debian'
61-
"-- --with-pg-include=#{postgresql_devel_path} --with-pg-lib=#{postgresql_devel_path}"
61+
"--platform ruby -- --with-pg-include=#{postgresql_devel_path} --with-pg-lib=#{postgresql_devel_path}"
6262
else
6363
raise "Unsupported platform family #{node['platform_family']}"
6464
end

0 commit comments

Comments
 (0)