finds.dev← search

// the find

RubyMoney/money

★ 2,875 · Ruby · MIT · updated Jun 2026

A Ruby Library for dealing with money and currency conversion.

A well-established Ruby gem for representing and operating on monetary values. It stores amounts as integers (fractional units) to sidestep float precision issues, and ships with a full ISO 4217 currency registry. The exchange rate system is pluggable but intentionally not batteries-included — you wire in your own rate source.

Integer-based storage is the right call and the implementation handles the subunit-to-unit ratio correctly for currencies like JPY (0 decimals) and TND (3 decimals), which most naive implementations botch. The pluggable rate store interface is clean — swapping from in-memory to Redis or ActiveRecord is a one-liner with no monkey-patching required. The `allocate` method (for splitting money without losing cents to rounding) is present and tested, which is the thing most home-grown money types are missing. RBS type signatures are included, which matters if you're running Sorbet or Steep on a typed Ruby project.

The global configuration model (`Money.default_currency`, `Money.rounding_mode`, `Money.locale_backend`) is a thread-safety hazard in anything that changes these settings at request time — the README doesn't warn you that mutating globals mid-flight in a multi-threaded Puma app will cause surprising races. The exchange rate layer has no concept of rate timestamps or staleness; you can accidentally do arithmetic with rates from yesterday and the library won't complain. `infinite_precision` mode uses BigDecimal under the hood but is off by default and poorly documented — first time you hit a rounding edge case you'll spend 30 minutes discovering it exists. String parsing was deliberately extracted to a separate gem (`monetize`), which is the right separation, but it means adding what most people consider basic functionality requires a second dependency.

View on GitHub → Homepage ↗

// want more like this?

We dig through GitHub every week and send a few repos picked for what you actually care about — each with an honest take like this one.

Get finds in your inbox → Search again →