diff --git a/bin/run b/bin/run index dc6220f0f1..f7ea7c9633 100755 --- a/bin/run +++ b/bin/run @@ -93,13 +93,15 @@ function main() { local phase phase="$(basename "${0}")" - if ! which ruby > /dev/null; then - mkdir -p "${RUBY_DIR}" + # Always install and use buildpack Ruby to ensure consistent version + # regardless of system Ruby availability + mkdir -p "${RUBY_DIR}" + if [ ! -d "${RUBY_DIR}/bin" ]; then util::install - util::environment::setup fi + util::environment::setup exec "${BUILDPACK_DIR}/bin/ruby-run" "${phase}" "${@-}" } diff --git a/config/ruby.yml b/config/ruby.yml index 94541f7ee4..0d05199092 100644 --- a/config/ruby.yml +++ b/config/ruby.yml @@ -14,6 +14,8 @@ # limitations under the License. # Configuration for Ruby +# Note: Ruby 3.2.8+ is required for Psych 5.0.1+ which supports YAML.load_file +# with permitted_classes and aliases keyword arguments used throughout the buildpack --- version: 3.2.+ repository_root: https://raw.githubusercontent.com/cloudfoundry/ruby-buildpack/master/java-index