make ensure-required-ruby-bundlers-installed despite asdf.opt_out

Overview

I cannot run gdk update

$ make ensure-required-ruby-bundlers-installed

--------------------------------------------------------------------------------
Ensuring all required versions of bundler are installed
--------------------------------------------------------------------------------
(i386) tkgl2:gdk-ee tkuah$ make ensure-required-ruby-bundlers-installed

--------------------------------------------------------------------------------
Ensuring all required versions of bundler are installed
--------------------------------------------------------------------------------
No preset version installed for command gem
Please install a version by running one of the following:

asdf install ruby 2.7.5
asdf install ruby 3.0.2
asdf install ruby 2.7.4

or add one of the following versions in your config file at /Users/tkuah/code/gdk-ee/.tool-versions
ruby 3.0.1
No preset version installed for command gem
Please install a version by running one of the following:

asdf install ruby 2.7.5
asdf install ruby 3.0.2
asdf install ruby 2.7.4

or add one of the following versions in your config file at /Users/tkuah/code/gdk-ee/.tool-versions
ruby 3.0.1
No preset version installed for command gem
Please install a version by running one of the following:

asdf install ruby 2.7.5
asdf install ruby 3.0.2
asdf install ruby 2.7.4

or add one of the following versions in your config file at /Users/tkuah/code/gdk-ee/.tool-versions
ruby 3.0.1
No preset version installed for command gem
Please install a version by running one of the following:

asdf install ruby 2.7.5
asdf install ruby 3.0.2
asdf install ruby 2.7.4

or add one of the following versions in your config file at /Users/tkuah/code/gdk-ee/.tool-versions
ruby 3.0.1
make: *** [ensure-required-ruby-bundlers-installed] Error 126

Steps to replicate (optional)

  1. Have asdf.opt_out
  2. Install asdf for another project (https://gitlab.com/gitlab-com/runbooks)
  3. Run gdk update
$ cat gdk.yml 
asdf:
  opt_out: true

Proposal (optional)

Environment (optional)

  • Operating system: macOS
  • The contents of your gdk.yml
  • Ruby version: ruby 2.7.5p203 (2021-11-24 revision f69aeb8314) [x86_64-darwin21]
  • GDK version: 0bb9ba44
$ cat gdk.yml 
asdf:
  opt_out: true
gdk:
  protected_config_files:
  - gitlab/config/database.yml
  update_hooks:
    after:
    - pushd gitlab && git checkout db/structure.sql
    - say 'GDK update done'
    before:
    - cd gitlab && bin/spring stop || true
    - cd gitlab && bin/spring stop || true
    - say 'GDK updating'
    - cd gitlab && bin/spring stop || true
gitlab:
  rails:
    multiple_databases: true

Workaround

brew uninstall asdf
Edited by Thong Kuah