Open-Awesome
CategoriesAlternativesStacksSelf-HostedExplore
Open-Awesome

© 2026 Open-Awesome. Curated for the developer elite.

TermsPrivacyAboutGitHubRSS
  1. Home
  2. Ruby
  3. Money

Money

MITRuby

A Ruby library for handling monetary values and currency conversion with precision and flexibility.

Visit WebsiteGitHubGitHub
2.9k stars642 forks0 contributors

What is Money?

RubyMoney is a Ruby library for handling monetary values and currency conversion in financial applications. It provides a `Money` class that encapsulates both value and currency information, using integer cents to avoid floating-point rounding errors. The library supports arithmetic operations, currency exchange, localized formatting, and integrates with Rails applications.

Target Audience

Ruby developers building financial applications, e-commerce platforms, or any system that needs to handle monetary values with precision and proper currency handling.

Value Proposition

Developers choose RubyMoney for its accurate integer-based representation that prevents rounding errors, comprehensive currency support with ISO 4217 compliance, and flexible architecture that allows custom exchange rate stores and formatting rules.

Overview

A Ruby Library for dealing with money and currency conversion.

Use Cases

Best For

  • Building e-commerce platforms with multi-currency support
  • Financial applications requiring precise monetary calculations
  • Handling currency conversion with custom exchange rate sources
  • Rails applications needing money object integration
  • Systems requiring localized currency formatting
  • Applications that must avoid floating-point rounding errors in financial calculations

Not Ideal For

  • Projects needing out-of-the-box, real-time currency conversion without custom integration
  • Simple applications where monetary values are only for display and don't require precise arithmetic
  • Systems handling non-ISO currencies like cryptocurrencies without standard subunits
  • Teams looking for a zero-configuration, drop-in money object with automated formatting

Pros & Cons

Pros

Precision Through Integer Cents

Stores monetary values as integers in cents to eliminate floating-point rounding errors, ensuring accurate financial calculations as emphasized in the README's features.

Comprehensive Currency Support

Encapsulates currency data in a dedicated Money::Currency class with ISO 4217 compliance, allowing easy extension and management of custom currencies.

Flexible Exchange Rate Architecture

Provides APIs for currency conversion with customizable exchange rate stores, enabling integration with databases, caches, or external APIs as shown in the Redis and ActiveRecord examples.

Localized Formatting with I18n

Integrates with Ruby's I18n gem for locale-specific formatting rules, making it adaptable for international audiences without hard-coded values.

Cons

Manual Exchange Rate Setup

Out-of-the-box, exchange rates must be manually added via Money.add_rate; automated real-time rates require additional gems or custom implementations, increasing complexity.

Breaking Changes in Updates

The README warns to read upgrade guides before major version upgrades, indicating potential backward compatibility issues that can disrupt existing codebases.

UTF-8 Dependency

The library requires applications to use UTF-8 encoding, which may be a constraint in environments with different character sets or legacy systems.

Frequently Asked Questions

Quick Stats

Stars2,879
Forks642
Contributors0
Open Issues5
Last commit1 month ago
CreatedSince 2008

Tags

#currency-conversion#money#ruby-gem#currency-handling#iso-4217#exchange-rate#rails-integration#localization#ruby#financial-calculations

Built With

R
Ruby

Links & Resources

Website

Included in

Ruby14.1k
Auto-fetched 13 hours ago

Related Projects

MonetizeMonetize

A library for converting various objects into `Money` objects.

Stars448
Forks116
Last commit3 months ago
eu_central_bankeu_central_bank

A gem that calculates the exchange rate using published rates from European Central Bank. Compatible with the money gem

Stars224
Forks130
Last commit3 months ago
Community-curated · Updated weekly · 100% open source

Found a gem we're missing?

Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.

Submit a projectStar on GitHub