Our CI/CD uses GitHub actions for, among other things, running our test suite. When the database is set up in the action workflow, it fails when it attempts to run "CREATE EXTENSION vector;" (in the Rails migration, it's "enable_extension 'vector'", which I'm sure is the correct syntax since all the other extensions work. I consistently get this error:
ActiveRecord::StatementInvalid: PG::UndefinedFile: ERROR: could not open extension control file "/usr/share/postgresql/1***/extension/vector.control": No such file or directory
I've confirmed the following: There is only one version of Postgres server running, it is version 15. The file in question does exist, at the expected path, with all the same permissions as the rest of the extensions:
/usr/share/postgresql/15/extension/vector.control
After installing everything, I restart postgres. I've attempted to install pgvector with apt-get and manually using the provided examples at https://github.com/pgvector/pgvector. As far as I can tell it's installed (as I said above, the missing file is right where it should be). I see this in the log trace:
Setting up postgresql-15-pgvector (0.***.***-1.pgdg22.0***+1) ...
I've added the location of the missing file to my path.
I'm not able to determine if the problem is with the rake task, or if it is just passing through the error from PG, but I suspect the latter since it says "PG::UndefinedFile" in the error message.
My container is ubuntu-latest
and the image is redis:alpine
. Ruby is version 3.2.2 and all the gems install correctly.
Anyone have a clue what I'm doing wrong?