.rb
💻 CodeText-based

.rb File — Ruby Source Code

text/x-ruby

File Inspector

Drop any file to identify its extension and type — runs entirely in your browser

RB

Drop a .rb file here or click to choose

Or drop any file to identify its extension

Expected MIME type:text/x-ruby

Quick Facts

Extension.rb
Full NameRuby Source Code
MIME Typetext/x-ruby
CategoryCode
TypeText-based (human-readable)
Typical Size1 KB – 100 KB
First Appeared1995

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

VS Code
RubyMine
Sublime Text
vim
Emacs
any text editor

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.