On this page
Overview
faker-ruby/faker is a fake-data generator for Ruby. It provides generators for people, addresses, internet values, dates, finance, strings, and many other domains across more than 40 locales for tests, demos, and development database seeds. The current version is 3.8.0 and requires Ruby 3.2 or newer.
Features and best fit
Based on official documentation; not hands-on tested · Content checked:
Key features
Generate sample data from domain-specific person, address, internet, date, and text generators
APIs such as Faker::Name, Faker::Internet, Faker::Address, and Faker::Lorem create realistic-looking values so tests and UI previews do not require large hand-written fixture sets.
Sources: [2]
Control uniqueness, reproducibility, and localization
.unique can avoid repeated values, while Faker::Config.random can use a seeded Random instance for deterministic output. I18n-backed locales produce region-specific names, addresses, phone numbers, and related values.
Sources: [2]
Version 3.8.0 adds optional lazy loading for generators
Faker 3.8.0 can enable lazy loading through Faker::Config.lazy_loading = true or FAKER_LAZY_LOAD=1, reducing initial load by loading generators as they are used.
Sources: [4]
Best fit
Fits Ruby and Rails unit tests, Factory Bot factories, demos, and development seeds
It is useful for model-factory attributes, UI previews, sample accounts, and performance datasets. When combined with Factory Bot, projects can explicitly control seeded randomness and unique-value behavior.
Sources: [2]
Before adoption
Version 3.8.0 requires Ruby 3.2+; generated values are not anonymized real data
The gemspec requires Ruby 3.2 or newer and i18n 1.8.11 or newer. Generated names, addresses, emails, and phone numbers can accidentally match real-world information, so keep them behind test-only boundaries and never send real notifications to generated contacts. Unique generators can also exhaust finite value sets.
Official sources
- [1]faker-ruby/faker — GitHub repository(2026-10-06)
- [2]Faker Ruby — README(2026-10-06)
- [3]Faker Ruby — faker.gemspec(2026-10-06)
- [4]Faker Ruby — CHANGELOG(2026-10-06)
- [5]Faker Ruby — v3.8.0 release(2026-10-06)
Supplemental curator note
This is the Ruby gem in a separate repository from the JavaScript Faker project. Generated values can accidentally match real information, so keep them behind test-only boundaries and pin a seed when deterministic tests are required.
Try it in 3 steps
- 1
Get the source
git clone --depth 1 https://github.com/faker-ruby/faker.git - 2
Enter the repository
cd faker - 3
Check the official steps
Continue with the commands in the README Installation, Quick Start, or Getting Started section.
find . -maxdepth 1 -iname 'README*' -exec sed -n '1,220p' {} \; -quit
Growth
Growth trends · Last 30 days
11,938 Stars
Trend data is still being collected.
Development activity
Last 90 days · weekly
- Commits (last 30 days)
- 4
- Open PRs
- 29
Development activity is still being collected.
Built with
Categories and tags
Categories
GitHub data
GitHub dataView detailed GitHub data
GitHub Topics
- fake
- ruby
Related information
Write a related articleShare a guide or use case for this OSS in Markdown. Articles are published after administrator approval.
Explore next
- Cypress51,042 Stars
1 shared tag(s) · 2 shared category(s)
run browser end-to-end and component tests through an interactive runner and CLI
TypeScript - Jest45,500 Stars
1 shared tag(s) · 2 shared category(s)
Combine assertions, mocks, watch mode, snapshots, coverage, and worker isolation in one JavaScript test runner
TypeScript - Testify26,222 Stars
1 shared tag(s) · 2 shared category(s)
augment Go's standard testing package with assertions, mocks, and suites
Go - Appium22,046 Stars
1 shared tag(s) · 2 shared category(s)
automate end-to-end tests for Android, iOS, and desktop apps through WebDriver-compatible APIs
TypeScript - jsdom21,696 Stars
1 shared tag(s) · 2 shared category(s)
emulate a subset of DOM and HTML standards in Node.js for testing and scraping
JavaScript - Catch221,508 Stars
1 shared tag(s) · 2 shared category(s)
write C++ unit tests, BDD scenarios, and micro-benchmarks in one test framework and integrate them with CMake and CTest
C++
Report incorrect information
Tell us if any listing information is incorrect or outdated.