.rb File — Ruby Source Code
text/x-ruby
Drop any file to identify its extension and type — runs entirely in your browser
Drop a .rb file here or click to choose
Or drop any file to identify its extension
text/x-rubyQuick Facts
| Extension | .rb |
| Full Name | Ruby Source Code |
| MIME Type | text/x-ruby |
| Category | Code |
| Type | Text-based (human-readable) |
| Typical Size | 1 KB – 100 KB |
| First Appeared | 1995 |
What Is a .rb File?
Ruby is a dynamic, interpreted programming language created by Yukihiro "Matz" Matsumoto in 1995, designed with an emphasis on programmer happiness and productivity. RB files contain source code in a language known for its elegant, readable syntax where everything is an object — including numbers, strings, and even nil. Ruby gained massive popularity through Ruby on Rails, a web application framework that introduced conventions like MVC architecture, RESTful design, and "convention over configuration" that influenced web development across all languages. The language features dynamic typing, duck typing, blocks and closures, mixins through modules, metaprogramming capabilities, garbage collection, and a comprehensive standard library. Ruby's ecosystem includes RubyGems for package management with over 170,000 gems, Bundler for dependency resolution, and robust testing frameworks (RSpec, Minitest). Ruby is used for web development (Rails, Sinatra), DevOps automation (Chef, Puppet, Vagrant), scripting, and prototyping. Modern Ruby (3.0+) has added features including Ractor for parallel execution, fiber scheduler for async I/O, and RBS type signatures.
How to Open .rb Files
Related File Extensions
More Code File Extensions
Other code formats you might encounter
Browse File Extensions by Category
Explore our reference of 259 file extensions with details, programs, and related formats.