Ruby has to my knowledge, 3 primary ways of using a Database.
Rails is famous for using ActiveRecord, but ActiveRecord can be used
independently of Rails. Its well worth learning as it makes database
use very easy indeed.
Another Ruby framework Nitro uses a database layer called Og (ObjectGraph)
which I presume (not sure) can be used externally to Nitro.
Lastly theres the default, DBI. This is a more conventional database access
library, where you are kept pretty close to the SQL mechanisms.