Online Ruby Compiler

Write Ruby 3.4 and run it in your browser. Your code stays on your device. Errors come with a plain explanation and a suggested fix.

Ln 1, Col 1

Run Ruby online: no install, no signup

This online Ruby compiler runs the real Ruby 3.4 interpreter compiled to WebAssembly, inside your browser. Your code is not uploaded. The first run downloads the Ruby engine (about 30 MB) and the browser keeps it for next time, so later runs start quickly.

puts, print, gets, blocks, classes, the standard library and string formatting all work. The Input tab feeds gets, one value per line. If the program stops with an error such as "undefined local variable or method", a card explains it and suggests the nearest name.

Press Tab after a few letters (for example def, each, class) to write the whole line.

Frequently asked questions

Which Ruby version is it?

Ruby 3.4 compiled to WebAssembly.

Can I use gems?

The standard library is included. Installing extra gems is not possible in the browser.

How do I read input?

Open the Input tab, type one value per line, then press Run. Each gets call reads the next line.

Why is the first run slow?

The Ruby engine is about 30 MB and downloads once. After that your browser keeps it.

Is my code private?

Yes. It runs fully in your browser.

Looking for another language? Open the full code editor with 100+ languages.