aws / aws/aws-codebuild-docker-images

Your PostgreSQL is too old.

Open
#596 0 comments 3 reactions 0 assignees View on GitHub
Dominant language
Dockerfile
Stars
1.2k
Forks
971
Avg merge
2h 47m
Merged PRs (30d)
1

Description

**Describe the bug**
I want to deploy a Rails 7 application .
I'm running `bundle install`( which includes the `pg`) from my `buildspec.yml` and facing the "Your PostgreSQL is too old." error.

```
...
Gem::Ext::BuildError: ERROR: Failed to build gem native extension.
--
274 |  
275 | current directory:
276 | /root/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/pg-1.4.5/ext
277 | /root/.rbenv/versions/3.1.2/bin/ruby -I
278 | /root/.rbenv/versions/3.1.2/lib/ruby/3.1.0 -r ./siteconf20230128-12992-bkluox.rb
279 | extconf.rb
280 | Calling libpq with GVL unlocked
281 | checking for pg_config... yes
282 | Using config values from /usr/bin/pg_config
283 | Using libpq from /usr/lib64
284 | checking for libpq-fe.h... yes
285 | checking for libpq/libpq-fs.h... yes
286 | checking for pg_config_manual.h... yes
287 | checking for PQconnectdb() in -lpq... yes
288 | checking for PQconninfo() in libpq-fe.h... no
289 | Your PostgreSQL is too old. Either install an older version of this gem or
290 | upgrade your database to at least PostgreSQL-9.3.
291 | *** extconf.rb failed ***
...
```

Why not `amazon-linux-extras install -y postgresql14` or something like that?

A possible solution is
```
....
- yum install -y amazon-linux-extras
- PYTHON=python2 amazon-linux-extras install -y postgresql14
- yum install -y postgresql-devel
...
```
inside my `buildspec.yml`.

Once we use `rvenv` why not instal ruby 3.1 too and later we could simply choose necessary ruby version by setting using `rbenv`? Otherwise `rbenv install 3.1.2` takes tooooo long.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.