Double-entry bookkeeping (financial accounting)


I’m looking for a ruby program that provides double-entry bookkeeping
in an organized database, as in a database that would be easy to
integrate into other processes (so I could make my own reports/etc).
Does anyone have a link to one?

I’ve toyed with the idea of making one myself since I can’t find
anything and it can’t be too difficult (3 tables not counting user
management? account, ledger, transaction), but I feel like I’m re-
inventing the wheel.