Ruby
The deplo.io build environment makes use of the Paketo Ruby buildpack.
Example App
We have a basic Rails app in our examples
repository. You can deploy
it with nctl
. This requires the rails
command to be installed for the
SECRET_KEY_BASE
. If you don't have it, any long random string will do (127+
chars).
nctl create application rails \
--git-url=https://github.com/ninech/deploio-examples \
--git-sub-path=ruby/rails-basic \
--env=SECRET_KEY_BASE=$(rails secret)
Build env considerations
The build process offers a few env variables to adjus it to your use-case. See the how to section of the documentation for all available variables.
Override the Detected Ruby Version
The buildpack will attempt to detect the desired ruby version from the
Gemfile
in the app source. It's possible to explicitly override the version
using the build-env variable BP_MRI_VERSION
.
--build-env=BP_MRI_VERSION="3.2.2"
Enabling Javascript at runtime
If your Ruby application is making use of Javascript/ExecJS at runtime, you can enable it
by setting the BP_INCLUDE_NODEJS_RUNTIME
to "true"
.
This will enable NodeJS at runtime.
--build-env=BP_INCLUDE_NODEJS_RUNTIME="true"