Assuming postgresql10 snap installed: bundle config build.pg --with-pg-config=postgresql10.pgconfig bundle install