Installing postgres gem when the database is on another server

My database is on a different server for the application. When I run "bundle", I get the following error:

No pg_config ... anyway. If the building does not work, try again with --with-pg-config = / path / to / pg_config

How to install pg config path if pg is not actually installed on the application server? I also tried:

bundle config build.pg --without-pg_config

thanks

+6
source share
1 answer

The Ruby PostgreSQL interface (AKA pg gem) is just a thin shell around the PostgreSQL client libraries. You need to install PostgreSQL client libraries and headers, or you cannot install pg gem. You do not need a full installation of PostgreSQL on your application server, but only client development libraries, the package is probably called something like "libpg-dev" or "libpq-dev".

+6
source

Source: https://habr.com/ru/post/925883/


All Articles