What is it?
Run Ruby runs the official Ruby 3.3 interpreter, compiled to WebAssembly by the ruby.wasm project, in a background worker in your browser. Its standard library is included, so puts, gets, blocks, classes, and libraries such as json and set all work, with nothing to install.
Who is it for?
Beginners learning Ruby, Rails developers testing a quick idea, teachers showing examples, and anyone on a computer where they cannot install software.
How to use it
- Type your program in Ruby code, or tap Try a sample. Ctrl + Enter runs it.
- For gets, put one answer per line in Input (for gets). Use gets.chomp to drop the line break.
- Press ▶ Run. The first run downloads the interpreter; your browser keeps it for next time.
- Read the Output; use Copy output, Download .rb or Clear output. ■ Stop ends a long run.
Worked example
total = gets.to_f
friends = %w[Asha Ravi Meena]
share = total / friends.size
friends.each { |f| puts "#{f.ljust(8)} pays #{format('%.2f', share)}" }
Type 900 in the Input box and press Run: each friend pays 300.00. Your code runs in your browser and is never uploaded.
Errors and how to fix them
- “The program ended with an error (see the output)”: the error message from the language is in the Output box. Read its last line first: it names the problem and the line number.
- “Stopped. Ruby will restart on the next run”: you pressed Stop. Methods you defined earlier are forgotten.
- undefined method … for nil: often gets returned nil because the Input box had too few lines.
- cannot load such file: gems are not available; only the standard library that ships with Ruby is.
- Nothing happens, or a “Could not load” message: the first use downloads the library. Check your internet connection, turn off an ad or script blocker for this site, and reload the page.
Open the tool: Run Ruby
Still stuck?
Contact support. Tell us which tool or page you were using, what you tapped, what you saw, and your phone or computer and browser (for example: Android phone, Chrome). We reply by email.






























Questions, or an error not listed here?
Tell us in the comments: what you were doing, the exact message you saw, and your device and browser. We read every comment and add new fixes to this article.