Specifying a Ruby Version

The default Ruby version is listed along with the other supported Native Environments.

You can customize the Ruby version for your app by adding a .ruby-version file or by setting the ruby directive in your Gemfile. If a version is set in both places .ruby-version will take priority.

To avoid any version mismatch confusion it can help to a single version set in .ruby-version and have the Gemfile read from it, for example:

Your .ruby-version could look like this:


Then the Gemfile can reference .ruby-version via the ruby directive:

ruby File.read('.ruby-version').strip