.rb

How to open a .rb file

Quick, free ways to open Ruby on any system.

A .rb file is a Ruby Source File. If double-clicking does nothing, your computer simply does not have an app that reads Ruby yet. Here is how to fix that on each operating system, using free software wherever possible.

Open a .rb file step by step

  1. Confirm the file really is a .rb. Drop it into the WhatFileType file identifier, which reads its signature without uploading anything.
  2. On Windows, open it with VS Code or RubyMine.
  3. On Mac, use VS Code or RubyMine.
  4. On Linux, try VS Code or vim.
  5. Still stuck? Search for a dedicated Ruby viewer.

Best apps to open .rb files

Windows

  • VS Code
  • RubyMine
  • any text editor

macOS

  • VS Code
  • RubyMine
  • any text editor

Linux

  • VS Code
  • vim
  • any text editor
!
Before you open it: Caution. A .rb file is a program. Running it executes its code, so read unfamiliar scripts before running them.

Frequently asked questions

Why can't I open my .rb file?

Almost always because no installed app understands Ruby. Install one of the apps above, or convert the file to a format your existing software already reads.

How do I run a .rb file?

With Ruby installed, run ruby file.rb from a terminal. There is no compile step; the interpreter runs the source directly.

How do I open a .rb file?

Any text editor shows it. VS Code or RubyMine add highlighting and tools for Ruby and Rails projects.

Learn more about .rb