The OpenShift documentation shows that a PostgreSQL connection string should look like this:

postgresql://user:password@host:port

However, the DataMapper documentation shows that a PostgreSQL connection string should look like this:

postgres://user:password@hostname/database

When using DataMapper on OpenShift, though, follow the DataMapper documentation, not the OpenShift documentation. The DataMapper gem attempts to require adapters based on the prefix name, so if you use “postgresql” as the prefix, it attempts to load the “dm-postgresql-adapter” gem, which does not exist. You will get a “cannot load file – dm-postgresql-adapter” error. So, stick with the DataMapper version and use the “postgres” prefix.