Ruby - Getting Started

I tried REPL with Kotlin and Java, both sucked: REPL with Kotlin is deprecated, unsupported and getting removed; REPL with Java is just bloated. Gave up. I’m becoming a huge fan of the “No tools” movement - use as few tools as possible. I believe this approach leads to simplicity. Tools lead you to the vicious cycle of complexity: tools hide the complexity away from you, which means you’re getting away with complexity, which means it creeps in, and you solve that with more tools. That also means that Jetbrains has an incentive to make Kotlin as complex and feature-rich as they can get away with, since their business model is to sell you tools. I’m starting to get disinterested in that, I’m fed up with Merchats With Complexity. No-tools also simplifies the ramp-up for newbies: imagine a newbie having to study Maven/Gradle, Intellij just to run Hello World app and then do something just a tiny bit more complex (like parsing YAML/JSON/XML or such).

Anyways, REPL in Ruby is so simple. To remove blank lines and comments from a file, you just need to run:

$ ruby -ne 'puts $_ unless $_.strip.empty? or $_.lstrip.start_with? "#"' <file

Autocompletion? Works! Run irb, type in "foo". and press TAB to cycle through stuff.

You can sudo apt install ruby but it’s not newest; the best way is to install via sudo snap install ruby --classic. The snap comes straight from Ruby core team and is thus safe to install.

Fast

Ruby VM is so fast to start, it’s not even funny. Sure, Java programs start fast too, unless you’re running them from Gradle - and then Gradle either takes 2 seconds to run, or takes shitload of RAM for Gradle Daemon. This has also huge advantage with GitHub Actions: Ruby springs to life and Rake builds your project so fast, the entire thing is done in 10 seconds. Compared to that, Gradle builds always take at least 1 minute.

No Tooling Required

irb auto-completion is brilliant, and it comes straight with Ruby - no need to install tools or anything else. You only need a text editor and irb to get started. Excellent. rake is also baked in, so you can quickly start writing build scripts.

REPL is supported out-of-the-box. Not just that - Ruby is perfect for small scripts, possibly replacing bash.

gems

At some point you’ll need gems, for example when generating documentation via YARD. This exposes the fact that many Ruby gems are half-implemented in C and require some tooling to update. I don’t mind: I won’t be studying their sources, and I’m not forced to write C, so I’m good.

Updating built-in gems (NOT NECESSARY)

This is not really necessary: Ruby projects use Bundler, and Bundler can install all necessary gems itself. Many gems aren’t half-implemented in C, and therefore do not require any additional tooling installed.

The default gems often have C code though; if you want to update those, you’ll need to setup the environment a bit first:

$ sudo apt install build-essential libffi-dev libssl-dev libyaml-dev

To update default gems:

$ gem update

Gem updates will be installed into your HOME folder ~/.gem.

Default gems should be updated as Ruby snap is updated, so I don’t think this is necessary.

Toy project

Check out koans-ruby which also demoes rake, bundler, YARD and also shows how to run all that from GitHub Actions.

Written on October 15, 2025