Working with Ruby?

Ruby ageing or fighting its own gems? We sort it out.

Most Ruby code that lands on our desk is not a Rails application at all. It is a pile of scripts, a DevOps tool, a small Sinatra service or a Jekyll site that has not had its interpreter or its gemset touched in years, and now nothing installs cleanly on a modern laptop.

  • Since 2015Fixing technology
  • FreeEstimates
  • US teamReal engineers

ruby.log

still failing

What it is

Ruby at a glance

Ruby is a dynamic, object-oriented language created by Yukihiro "Matz" Matsumoto in Japan in 1995. It became famous for readability and for the mantra of being optimised for programmer happiness rather than machine convenience.

The reference implementation is MRI, which is now called CRuby, and there are alternative runtimes including JRuby on the JVM and TruffleRuby on GraalVM. Ruby 3.x introduced the fibre scheduler, the YJIT compiler, pattern matching and Ractors for parallel work. The dominant use case remains Rails web applications, but Ruby also powers Sinatra services, the Jekyll static site generator, the Chef and Puppet configuration tools, the Metasploit security framework and the Homebrew package manager on macOS.

Type
Dynamic object-oriented language
First released
1995
License
Ruby License or 2-clause BSD
Maintained by
Yukihiro Matsumoto and the Ruby core team
Typically used for
Rails web apps, DevOps tooling (Chef, Puppet), static site generators, CLI tools

The honest version

Ruby pros and cons

No technology is all upside. This is where Ruby earns its place and where it tends to cause trouble.

Where Ruby is strong

  • Expressive and readable syntaxRuby code tends to look close to the sentence you would write to explain what it does, which keeps small codebases approachable long after the original author has moved on to another project.
  • Metaprogramming that earns its keepOpen classes, method_missing and define_method let libraries build clean domain specific interfaces on top of the language, and the whole Rails ecosystem rests on this capability in ways no imitation has quite matched.
  • Pleasant interactive shellsThe built in irb and the richer pry console let you load a running application, poke at real objects, and reshape code in place rather than guessing from a stack trace in a log file.
  • A mature gem ecosystem with BundlerRubyGems hosts a huge library of packages, Bundler locks their versions reliably, and for most problems a well maintained gem already exists rather than something to build from first principles.
  • Active stewardship from Matz and the core teamThe language still ships a predictable Christmas release each year with real design behind it, rather than drifting the way some legacy platforms do once their peak is past.
  • YJIT brings real performance gains in Ruby 3.xThe YJIT in process compiler, originally contributed by Shopify, delivers measurable throughput improvements on production workloads without requiring any code changes from the application author.
  • Ractors, pattern matching and the it block parameterRuby 3 added Ractors for actor style parallelism, case/in pattern matching that genuinely competes with functional languages, and the it short block parameter that trims a surprising amount of boilerplate.

Where Ruby bites

  • End of life interpreters still run everywhereRuby 2.7 reached end of life in March 2023 and Ruby 3.0 followed shortly after, yet both still run plenty of production workloads with no security patches coming in and nobody signed up to move them.
  • Native extensions fight modern hardwareGems like nokogiri, pg, sassc and ffi ship C extensions that need a working compiler, and every round of Apple Silicon, glibc or OpenSSL changes breaks installs for anyone on a slightly older interpreter.
  • Version management is its own rabbit holeTeams end up mixing Bundler with rbenv or rvm or asdf alongside a system Ruby from the operating system, and the resulting PATH confusion is a regular source of lost afternoons.
  • The threading model has hard limitsThe global VM lock means pure Ruby threads do not achieve true parallelism across cores for CPU bound work, and while Ractors address this they are still experimental and not widely adopted in production libraries.
  • Legacy apps pin to old everythingA codebase stuck on Rails 5 tends to also be pinned to Ruby 2.6, an old Bundler, old native extensions and old operating system packages, and the whole stack has to move together rather than one piece at a time.
  • The deployment story outside Rails is thinnerRails has a well understood production path with Puma, Sidekiq and a handful of hosting choices, but standalone Ruby services and long running scripts have fewer well trodden patterns than the equivalent Python or Go code would.

Sound familiar?

Common Ruby problems we fix

The Ruby problems that bring people to us, and what you have once each one is fixed.

Ruby 2.7 end of life March 31, 2023

The interpreter is unsupported

The language runtime stopped receiving security fixes, and newer gems routinely refuse to install against it without a compatibility pin.

Interpreter back on a supported line

native extension failed

Gems will not build on Apple Silicon

A gem with a C extension was last built against an older toolchain, and current compilers or linkers reject it until the gem is rebuilt or replaced.

Dependencies compiling cleanly on current hardware

rbenv: version 2.6.6 is not installed

The version manager is wedged

Several version managers leave artefacts on the same machine, and the shell ends up pointing at an interpreter that was never actually installed.

One version manager, predictable shims

LoadError: cannot load such file -- openssl

The standard library has gaps

An interpreter compiled without zlib, openssl or readline headers present is missing pieces of the standard library, and Bundler fails before the application even starts.

Interpreter rebuilt with full support

Thread.exit removed in Ruby 3.3

Deprecated APIs finally got removed

Code that quietly relied on a method the Ruby team deprecated years ago now throws on load, often in a dependency rather than the application itself.

Deprecated calls replaced across the tree

last commit 18 months ago

A script nobody has touched in years

A small operational tool written by someone who has since left, running on an interpreter that is no longer on the machine it was meant for.

Script revived on a current interpreter

What we do

Ruby help, from upgrade to upkeep

Call us for one version bump, or hand us the whole codebase.

Interpreter upgrades
Ruby moved from 2.7 or 3.0 onto a supported 3.x release, with every gem rebuilt against the new interpreter.
Gem rot repair
Native extensions that will not build, Bundler locks nobody can resolve, and pinned versions traced back to a real reason.
Takeovers
Inheriting a Ruby codebase from a developer who has moved on, documented and running cleanly on a current machine.
Performance
Profiling with stackprof and rbspy, YJIT enabled where it helps, and hot paths measured before and after any change.
Tooling and scripts
Operational Ruby outside of Rails, including Chef recipes, Jekyll sites, Sinatra services and standalone command line tools.
Managed Tech
Monitoring, patching, backups and a team to call, on an ongoing basis.

How it works

From first message to fixed

  1. Look Free estimate

    Tell us what's going wrong. We look at it, then tell you plainly what's wrong and what it will cost.

  2. Fix

    We fix the cause, not the symptom. If something is down, getting it back up comes first.

  3. Harden

    Backups, monitoring, updates and access, so the same problem can't quietly come back.

  4. Hand back or stay on

    You get a plain-language write-up. Or we stay on for hosting, upkeep and new work.

Often found together

Running Ruby alongside something else?

We work on the whole stack, so the problem can be wherever it actually is.

Questions

Ruby questions

Something else? Call+1 737 727 7327

Can you upgrade our Ruby version from 2.7 to 3.3?

Yes, this is routine work for us. We step the interpreter forward one minor version at a time, rebuild every native gem against each new runtime, resolve deprecations as they appear in the warnings output, and confirm the application still behaves identically before the next step rather than stacking all the risk at the end.

Can you take over a Ruby codebase from a developer who moved on?

Yes. We clone the repository as it stands today, get it building on a current laptop and a staging environment, document the install steps and the production topology, move hosting and secrets into accounts your business controls, and from that point the codebase is something you own rather than something only one person could ever touch.

How do we fix 'native extension failed' gem install errors on Apple Silicon?

Almost always it is a combination of a gem pinned to an old C extension, a Ruby interpreter built without the matching headers, and a Bundler that remembers an architecture from the last machine. The fix is to rebuild the interpreter with the right libraries available, upgrade the affected gem to a version that knows about arm64, and regenerate the platform specific entries in Gemfile.lock.

Is it safe to keep running Ruby 2.7 or 3.0 in production?

No, not comfortably. Both versions are past their official end of life and no longer receive security patches from the core team, which means any vulnerability found in the interpreter or its bundled libraries sits open on your servers until the version itself moves. Commercial backports exist but they cost money and they are a bridge rather than a destination.

Should we rewrite a small Ruby script in Go or Python?

Usually not, and usually not for the reason people expect. A working Ruby script represents someone's understanding of a real operational problem, and rewriting it in another language throws that understanding away alongside any bugs. We only recommend a rewrite when the script is doing something Ruby is genuinely poor at, and even then we show you the reasoning first.

How much does Ruby help cost?

Estimates are free. Describe the codebase and what is going wrong, and you get a price before any work begins.

Free estimate

Ruby giving you trouble?

Tell us what you're running and what's going wrong. A person reads it and comes back with an estimate.

  • No charge to find out what it will take
  • If it's urgent, say so

Replies come from a person. By sending, you authorize us to email you back. No marketing.