If you connect to a PostgreSQL server that requires SSL, you get:
no pg_hba.conf entry for host "192.168.1.2", user "nate", database "sales", SSL off
The official PostgreSQL libraries default to sslmode=prefer, so SSL should always work unless you manually disable it (sslmode=disable).
However, I don’t know much about Ruby. I wonder if the postgres-pr library used here even supports SSL.