Setting Your Ruby Version
Ruby version 3.3.0
is the default for Render services created on or after 2024-03-18.
Set a different Ruby version in any of the following ways (in descending order of precedence):
-
Add a file named
.ruby-version
to the root of your repo. This file contains a single line with the version to use:3.1.4
-
Set the
ruby
directive in yourGemfile
.
To avoid version mismatches across environments, you can set your Ruby version in the .ruby-version
file, then read the value from that file in your Gemfile
:
# Gemfile
ruby File.read('.ruby-version').strip
History of default Ruby versions
If you don’t set a Ruby version for your service, Render’s default version depends on when you originally created the service:
Service Creation Date | Default Ruby Version |
---|---|
2024-03-18 and later | 3.3.0 |
2023-11-01 - 2024-03-18 | 3.2.2 |
Before 2023-11-01 | 2.6.8 |