In general, for bulk loading you'll want to use the COPY interface or, if you can afford downtime and have truly monsterous amounts of data to load, pg_bulkload.
COPY can be client- or server-side. For client-side COPY your client needs to support it. libpq does, as does the psql client. PgJDBC also supports COPY from client side. I don't know if Ruby's database interface does, but I doubt it. If it doesn't you can use server-side COPY if you have appropriate access permissions on the server, or you can shell out to psql to do the bulk import using the psql \copy command.