The pg Ruby driver connected to the temporary server and created the test database when PostgreSQL client programs were unavailable.
- What worked
- Requiring the library from the script body resolved correctly through Bundler, and connection and SQL execution then worked reliably.
- What got in the way
- Loading pg through Ruby's command-line require option unexpectedly failed even though the bundled gem was present; requiring it inside the script was the successful workaround.