Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Installing postgres gem when database is on a different server

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

No pg_config... trying anyway. If building fails, please try again with --with-pg-config=/path/to/pg_config

How do I set the pg config path if pg is not actually installed on the application server? I have also tried:

bundle config build.pg --without-pg_config

Thanks

like image 311
sebastyuiop Avatar asked Sep 21 '12 00:09

sebastyuiop


1 Answers

The Ruby PostgreSQL interface (AKA the pg gem) is just a thin wrapper around the PostgreSQL client C libraries. You need to install the PostgreSQL client libraries and headers or you can't install the pg gem. You don't need a whole PostgreSQL installation on your app server, just the client development libraries, the package is probably called something like "libpg-dev" or "libpq-dev".

like image 70
mu is too short Avatar answered Sep 18 '22 17:09

mu is too short