Ruby library using postgresql