The RVM Cloud Native Buildpack installs RVM and a Ruby version in an OCI image. It has been created for usage in conjunction with the Rails builder.
- The RVM CNB installs RVM into its own layer. The version of RVM to be installed can be configured in buildpack.toml.
- The files
Gemfile
andGemfile.lock
must exist in the application directory so that the RVM CNB can start the DETECTION phase. - It also installs a version of Ruby using RVM. The version to be installed is selected as follows (in order of precedence, the method listed highest wins):
- If there is a called
buildpack.yml
in the application directory, it may specify a ruby version. See below to learn possible keys in the buildpack.yml file. - If there is a file called
Gemfile.lock
, then the string "RUBY VERSION" is searched within this file and if it exists, the contents of the next line is used to select the Ruby version. - If there is a file called
Gemfile
, then the string "ruby <version string>" is searched within this file and if it exists, the given Ruby version is selected. - If there is a
.ruby-version
file, its contents are used to select the Ruby version. - If none of the files specified above exists, then the Ruby version specified in buildpack.toml will be selected. The variable that specifies the default Ruby version is called
default_ruby_version
.
- If there is a called
A buildpack.yml may specify the following keys. If buildpack.yml specifies a Ruby version, it will have priority over all other Ruby version sources.
rvm:
rvm_version: 1.29.10
ruby_version: 2.6.1
node_version: 10.*
require_node: true
This CNB installs the Node CNB as a dependency in the build and launch layers. Currently, the default version of Node installed is the latest 12.*
version.
- Refactor this CNB and remove Bundler specific functionality
- Only leave functionality directly related to the installation or configuration of RVM and a particular Ruby version