Rails Version Support
Last updated December 03, 2024
Table of Contents
You can run different versions of Rails on Heroku. This article describes our Rails version support policy.
Rails Version Configuration
To specify the Rails version for your application, put it in your Gemfile
.
Supported Rails Versions
Supported Versions on Cedar Apps
You can use any version of Rails ever deployed on the platform. However, we can’t promise that older versions of Rails can work on the oldest available Ruby version on a given stack.
For example, if Rails 3.2 can’t run on Ruby 2.4.10 or higher, then you can’t run a Rails 3.2 application on Heroku. We don’t maintain version compatibility information between Ruby and Rails.
Supported Versions on Fir Apps
The minimum version is Rails 5+. You can deploy a Rails 5+ application if it uses a supported Ruby version and conforms to the Ruby application contract. The recommended minimum Rails version is 7.1
+, which reaches end of life on Rails Core on October 1st, 2024.
Rails Version Support Policy
Heroku’s support of Rails versions mirrors the Rails Core version support.
If your version of a library, such as Rails, doesn’t work on a supported Ruby version, you can use a service such as Rails LTS. Rails LTS provides a maintained version of older releases for a fee. The Rails LTS project isn’t affiliated with Heroku or with Rails Core.
If you’re not using a Rails Core officially supported version or an LTS-supported version, your application likely has unpatched security vulnerabilities. We recommend always staying on an officially supported Rails version.
Support Policy on Cedar Apps
Heroku doesn’t sunset availability for older Rails versions.
Support Policy on Fir Apps
Ruby on Fir can contain version-specific code paths to help make deploying and running Rails versions easier.
If a Rails version is no longer supported, its version-specific buildpack code paths don’t receive bug fixes. Those code paths are still accessible but we can remove them in the future following a sunsetting process. Any code-specific paths go through a deprecation cycle where apps that rely them see warnings before removal.
We won’t remove version-specific code until after the most recent builder becomes unavailable. For example, if Rails 7.2
support ends while heroku-24
is the most recent builder, any Rails 7.2
specific code from the buildpack remains until after heroku-24
sunsets and is no longer accessible on the platform.
In addition, Rails versions are limited by the Ruby version they can utilize; therefore, they must use a supported Ruby version.