Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Your PostgreSQL is too old. #596

Open
fade2black opened this issue Jan 28, 2023 · 0 comments
Open

Your PostgreSQL is too old. #596

fade2black opened this issue Jan 28, 2023 · 0 comments

Comments

@fade2black
Copy link

fade2black commented Jan 28, 2023

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant