Loading…

Online Ruby Compiler and Playground

Browser-based compiler and playground for Ruby — Progsity IDE.

About Ruby

Ruby blends readable syntax with powerful metaprogramming—popularized by Rails but still beloved for scripting and DevOps. This Ruby playground runs your scripts with MRI-style behavior so you can practice enumerables, blocks, and string ergonomics in the browser.

Output goes to stdout; errors show as stack traces in stderr. It is a friendly environment to try Enumerable methods and small CLI-style logic.

Sign in to save snippets you reuse when teaching or blogging about Ruby idioms.

How to use

  1. Write top-level Ruby. puts prints a line; p inspects values.
  2. Use gets.chomp if you read stdin; paste matching lines in the stdin panel.
  3. Iterate with .each and blocks; fix NameError messages if a method is missing.

FAQ

Is Ruby free to run?

Yes. Execution is free; snippet storage follows account limits.

Which Ruby version?

A modern MRI-compatible runtime in the sandbox. Print RUBY_VERSION to verify.

Can I require gems?

Phase 1 focuses on the standard library—no arbitrary gem installs.

Save Ruby code?

Yes after sign-in.

Compiler or playground?

Ruby is interpreted; you still get quick feedback loops like an online playground.

Code examples

Tap “Try this” to load sample code into the editor above.

  • times block

    3.times { |i| puts "step #{i}" }
  • Enumerable select

    nums = [1, 2, 3, 4, 5]
    puts nums.select { |x| x.even? }.inspect
  • Hash merge

    h = { a: 1, b: 2 }
    puts h.merge(c: 3).inspect
  • String interpolation

    name = "learner"
    puts "Hello, #{name.upcase}!"