Description
DoubleEntry is a Ruby gem that adds a double-entry accounting system to Ruby and Rails applications. Each transfer creates two entries in the database, which is how double-entry bookkeeping records money moving between accounts. The gem does not enforce full accounting rules on its own. It can optionally make sure a balance stays positive, and it uses an allowlist of approved transfers. Money values are handled with the Money gem. You define accounts and the transfers allowed between them in a configuration file, then record transactions through a few methods in the DoubleEntry module. Accounts can be scoped, for example one per user, and the README recommends scoping because unscoped accounts can slow down under lock contention. Installation includes a generator for the Rails migrations, and metadata is stored in a JSON column by default. The gem is tested against several Ruby and Rails versions, and against MySQL, PostgreSQL and SQLite. It suits Ruby developers who need to track money moving between accounts in their app.…
Highlights
- Two database entries for each transfer
- Config file for accounts and approved transfers
- Scoped accounts, such as one per user
- Money values through the Money gem
- Tested with MySQL, PostgreSQL and SQLite
Ratings & Reviews
No ratings yet
Be the first to rate Double Entry.
People also visit
Double Entry FAQ
What is DoubleEntry?
A Ruby gem that records money transfers as double-entry bookkeeping in a Rails app.
Does it enforce accounting rules?
Not fully. It can optionally keep a balance positive and uses an allowlist of approved transfers, but it does not enforce every accounting rule.
How do I install it?
Add the gem to your Gemfile and run bundle install. Then generate the Rails migrations and update the local database.
Which databases are supported?
The README lists MySQL, PostgreSQL and SQLite as tested databases.
Should I scope accounts?
The README recommends it, because unscoped accounts can perform more slowly due to lock contention.
What are the best Double Entry alternatives?
Popular alternatives to Double Entry include LedgerSMB, Rustledger and Ledger. See all Double Entry alternatives



