Ruby Buildpack on App Platform

App Platform is a Platform-as-a-Service (PaaS) offering that allows developers to publish code directly to DigitalOcean servers without worrying about the underlying infrastructure.


How App Platform Builds Images

App Platform supports two ways to build an image for your app: Cloud Native Buildpacks and Dockerfiles.

When you give App Platform access to your code, it defaults to using a Dockerfile if one is present in the root of the directory or specified in the app spec. Otherwise, App Platform checks your code to determine what language or framework it uses. If it supports the language or framework, it chooses an appropriate resource type and uses the proper buildpack to build the app and deploy a container.

heroku-buildpack-ruby is the buildpack for detecting and building Ruby applications.

Ruby Applications using Buildpacks

App Platform looks for any of the following to detect a Ruby or Ruby on Rails application:

  • Gemfile
  • Gemfile.lock
  • Rakefile

Current Buildpack Version and Supported Runtimes

App Platform uses version 277 of the Heroku Ruby Buildpack. If no version is specified in your app, App Platform defaults to using version 3.1.6.

App Platform offers the v2 and v1 of the Ruby buildpack. To start using Ruby v2, we recommend upgrading your stack to Ubuntu-22 before upgrading to newer Ruby versions. To see specific runtimes that are available for these versions, look at our release notes.

The buildpack supports the following Ruby runtime versions:

  • Ubuntu-22
    • 3.3.0 - 3.3.4
    • 3.2.0 - 3.2.2
    • 3.1.0 - 3.1.4

Specify a Ruby Version

You can configure the Ruby version used at runtime by specifying a Gemfile file at the root of your source code:

    
        
            
source "https://rubygems.org"
ruby "2.5.1"
# ...

        
    

Limits

  • You must commit a Gemfile to an app’s repo alongside its source code.