Docs menu
Runtime versions
Which Ruby versions Primcloud supports, how to pin one via the Gemfile and Gemfile.lock, and how to upgrade.
On this page
Primcloud installs the Ruby version your Gemfile.lock pins. Pin nothing and you get the default Ruby, which changes over time.
Supported versions#
The Ruby versions you can install are part of the Primcloud Runtime. Each deployment's build log shows the exact version it installed.
| Ruby line | Support status |
|---|---|
| 3.3 | Supported |
| 3.4 | Supported (default) |
The build installs the exact release you pin in Gemfile.lock. Support follows Ruby's branch policy: a version past its end-of-life gets no more security fixes and is eventually removed from the Primcloud Runtime.
An older release may still install, but it gets no fixes once its branch reaches end-of-life. Move to a maintained one.
JRuby. JRuby runs on Primcloud when your Gemfile.lock declares it. A JDK is installed alongside. Your build log names the JRuby version it resolves.
Pinning a version#
Two files together control the version that gets installed:
1. Gemfile: declare the version:
source "https://rubygems.org"
ruby "3.4.10"
# ...
2. Gemfile.lock: commit the lockfile with a matching RUBY VERSION block:
RUBY VERSION
ruby 3.4.10p0
Regenerate the lockfile after changing the Gemfile:
bundle update --ruby
git add Gemfile.lock
git commit -m "Pin Ruby 3.4.10"
The Ruby version Primcloud installs is read from Gemfile.lock's RUBY VERSION. The Gemfile line alone isn't consulted at build time. Committing a lockfile without a RUBY VERSION block means you get Primcloud's default Ruby.
No configuration. With no RUBY VERSION block in the lockfile, you get the default Ruby. A build-log line indicates whether the version was sourced from the lockfile or the default:
Ruby version `3.4.10` from `Gemfile.lock`
vs.
Ruby version `<version>` from `default`
Pinning explicitly avoids the second case entirely.
Upgrading#
Bump the pin and redeploy:
- Edit the
rubyline inGemfile. - Run
bundle update --rubylocally to regenerateGemfile.lock. - Commit both and push.
The next build installs the newer Ruby. Because the Ruby version is part of the gem-cache invalidation key, changing Ruby also rebuilds your gem cache from scratch. Expect one longer build after the bump, then normal speed on subsequent deploys.
Review Ruby's news pages for the release notes between the version you're on and the version you're going to. Native gems (nokogiri, pg, sqlite3, bcrypt) that ship precompiled binaries per Ruby minor version will reinstall on the first build after the upgrade.
When a version drops out of support#
Ruby core drops a minor branch at a scheduled date. When that happens on Primcloud:
- Builds targeting a supported version continue to work.
- Builds pinned to a version that's been removed from the Primcloud Runtime fail with an "Error installing Ruby" build error.
- Builds without a
RUBY VERSIONblock continue with whatever Primcloud's default is at that time, which may or may not be compatible with your app.
Bump to a supported patch before the EOL date to avoid a forced upgrade under pressure.