Ruby · online compiler

Run Ruby online

Run Ruby online — Ruby 3.4, 3.3, or 3.x MRI, blocks and metaprogramming, browser-hosted.

Firecracker microVM live per-test verdicts multi-file compile

Ruby remains the definitive scripting language for developer happiness: clean OO, blocks and yield, extensive metaprogramming, RSpec-style DSL culture. Rails powers a huge slice of the SaaS internet.

ls-judge runs Ruby on MRI inside a Firecracker microVM. Pick Ruby 3.4 for the current line, 3.3 for the last LTS-track release, or the generic 3.x baseline.

Starter code

What you get in Ruby

Clicking "Run now" opens the playground with this exact code and a matching test case pre-loaded — passes on first Run.

ruby
Ruby 3.4
n = gets.chomp.to_i
puts n * 2
stdin →21
expected →42
FAQ

Common questions about Ruby on ls-judge

Which Ruby versions?
Ruby 3.4, 3.3, and a generic 3.x — all MRI, YJIT-enabled.
RubyGems / Bundler?
No — no network in the sandbox.
Rails?
Framework install requires network + a server; not offered here. Pure Ruby only.
Free?
Yes.
Further reading
Also try