Installing do_postgres on MacPorts
Ensure that pg_config is in your $PATH.
Note: This expects you are using PostgreSQL 8.2. Alter the directories as required.
To test if pg_config is included, execute which pg_config
:
Expected Result:
/opt/local/lib/postgresql82/bin/pg_config
Including pg_config into your $PATH
If you don’t get anything, then it isn’t in your path. Append the following to your ~/.profile file:
export PATH=$PATH:/opt/local/lib/postgresql82/bin
Now it will be included in all new terminal sessions.
Installing do_postgres
Now feel free to install the do_postgres gem.
sudo gem install do_postgres -- --with-pgsql-include-dir=/opt/local/include/postgresql82/ --with-pgsql-lib-dir=/opt/local/lib/postgresql82/
Note: This is a single line command.


