Heroku & Ruby Compatibility Table
In this article we will present compatibility between Ruby and Heroku across different versions. In the process of upgrading really old applications to more modern versions of Ruby we have run into a lot of these combinations.
To find more information about Heroku Ruby support check out the Heroku Ruby Support Reference page . In general, however, we suggest you to follow the Ruby Core support policy .
Heroku Stacks and Ruby Versions
Heroku stacks are the underlying operating system (OS) environments that power your applications, built on Ubuntu LTS (Long-Term Support) versions. Each stack supports specific Ruby versions, and aligning your application with the correct stack and Ruby version is critical for ensuring compatibility and avoiding deployment issues.
Heroku Stacks Ruby Version Compatibility
When a Heroku stack reaches its end-of-life (EOL), it no longer receives security updates or official support. This can impact your application’s compatibility with Ruby versions and expose it to security vulnerabilities.
Heroku announces EOL dates well in advance, giving developers time to migrate to newer stacks. Migrating often requires updating your Ruby version to ensure compatibility.
For a detailed guide on upgrading to Heroku-22, refer to Aysan’s article on FastRuby.io..
| Stack | Base OS | Ruby Versions | End of Life | Status |
|---|---|---|---|---|
| Heroku-26 | Ubuntu 26.04 | 3.2.x - 4.0.x | April 2031 | Active (newest stack) |
| Heroku-24 | Ubuntu 24.04 | 3.1.x - 4.0.x | April 2029 | Active (default stack) |
| Heroku-22 | Ubuntu 22.04 | 3.1.x - 4.0.x | April 2027 | Deprecated, migrate to Heroku-24 or Heroku-26 |
| Heroku-20 | Ubuntu 20.04 | 2.5.x - 3.4.x | April 2025 | End-of-life, migrate now |
Heroku’s currently supported Ruby lines are 3.3, 3.4, and 4.0 (the default for new apps is 3.3.9). Ruby 3.2 and older are still installable but are end-of-life upstream, so they no longer receive Ruby Core support. Heroku-26 dropped 3.1.x, so plan on Ruby 3.2 or newer if you move to it.
There’s also support for JRuby , an implementation of the Ruby programming language that runs on the Java Virtual Machine (JVM) and can be deployed on the Heroku platform.
Supported Bundler Versions
Heroku’s support for bundler versions is split based in two different Heroku Generations: Cedar and Fir . Heroku stacks 20/22 are only in Cedar, while Heroku-24 and Heroku-26 can run on either Cedar or Fir.
Cedar applications will bundle with the following versions:
| Bundle With | Install |
| 1.x | 1.17.3 |
| 2.0.x to 2.3.x | 2.3.25 |
| 2.4.x | 2.4.22 |
| 2.5.x | 2.5.23 |
| 2.6.x | 2.6.2 |
For applications running on the Fir Generation, bundler support for Gemfile.lock formats and bundler will mirror Bundler’s maintenance policy. Check the Bundler version configuration on Fir for further reference.
Heroku’s recent plan changes
In June 2026, Heroku announced that it is no longer offering Enterprise Account contracts to new customers, and that it is moving to a “sustaining engineering” model focused on stability and security rather than new features. Existing Enterprise subscriptions and support contracts are still honored, and credit card customers see no change. If you were counting on a new Heroku Enterprise agreement, this is worth factoring into your platform plans.
Need to Migrate to a newer Heroku stack?
We can help you stay on supported versions of Ruby and Heroku. Send us a message!
Thinking about leaving Heroku?
If the plan changes have you reconsidering Heroku altogether, we help engineering organizations move off Heroku and onto other PaaS platforms. We wrote up the options and trade-offs in How to Migrate from Heroku, and our team can plan and run the migration for you. Get in touch.
Feedback Wanted: Updates
If you find that this article has fallen out of date, send us message! We will continue to update this article as newer versions of Heroku and Ruby are released.