Setting up AI Gateway failed with No such file or directory gdk/gitlab-ai-gateway/.env

When I tried to run the rake setup_ai_gateway locally I got the following error:

 $ be rake setup_ai_gateway
Setting up GitLab AI Gateway...
Enter your Anthropic API key: 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
Do you want to set additional environment variables for debugging? [y/N]: y
Do you want to enable Duo Features in SaaS (GitLab.com) Mode? [y/N]: N
Do you want to enable hot reload?[y/N]: y
Enabling GitLab AI Gateway in GDK config...
ℹ️  A backup of 'gdk.yml' has been made at '.backups/gdk.yml.20250514141712'.
Updating GDK...
ℹ️  gdk update: before hook -> support/exec-cd gitlab bin/spring stop || true
Spring is not running

--------------------------------------------------------------------------------
Running self-update on GDK
--------------------------------------------------------------------------------
Already on 'main'
┌ ✔ Update your GDK
├── ✔ Install gems for GDK [276ms]
├── ✔ Platform update [27s]
├── ✔ Tool versions update [7s]
├── ✔ Preflight Update checks [5ms]
├── ✔ Update GitLab repository [9s]
├── ✔ Run `make gitlab/.git` [1s]
├── ✔ Run `make gitlab-config` [2s]
├── ✔ Run `make gitlab-asdf-install` [2s]
└── ✖ Run `make .gitlab-bundle` [7s]
❌️ ERROR: Task update:make:.gitlab-bundle failed:

  The internal error was:

        (ArgumentError) wrong number of arguments (given 4, expected 5)

  ERROR:  While executing gem ... (ArgumentError)
      wrong number of arguments (ArgumentError)
        /Users/dylangriffith/.local/share/mise/installs/ruby/3.3.7/lib/ruby/3.3.0/rdoc/parser.rb:167:in `for'
        /Users/dylangriffith/.local/share/mise/installs/ruby/3.3.7/lib/ruby/site_ruby/3.3.0/rubygems/request_set.rb:313:in `block in install_hooks'
        /Users/dylangriffith/.local/share/mise/installs/ruby/3.3.7/lib/ruby/site_ruby/3.3.0/rubygems/request_set.rb:312:in `each'
        /Users/dylangriffith/.local/share/mise/installs/ruby/3.3.7/lib/ruby/site_ruby/3.3.0/rubygems/request_set.rb:312:in `install_hooks'
        /Users/dylangriffith/.local/share/mise/installs/ruby/3.3.7/lib/ruby/site_ruby/3.3.0/rubygems/request_set.rb:210:in `install'
        /Users/dylangriffith/.local/share/mise/installs/ruby/3.3.7/lib/ruby/site_ruby/3.3.0/rubygems/commands/install_command.rb:207:in `install_gem'
        /Users/dylangriffith/.local/share/mise/installs/ruby/3.3.7/lib/ruby/site_ruby/3.3.0/rubygems/commands/install_command.rb:223:in `block in install_gems'
        /Users/dylangriffith/.local/share/mise/installs/ruby/3.3.7/lib/ruby/site_ruby/3.3.0/rubygems/commands/install_command.rb:216:in `each'
        /Users/dylangriffith/.local/share/mise/installs/ruby/3.3.7/lib/ruby/site_ruby/3.3.0/rubygems/commands/install_command.rb:216:in `install_gems'
        /Users/dylangriffith/.local/share/mise/installs/ruby/3.3.7/lib/ruby/site_ruby/3.3.0/rubygems/commands/install_command.rb:162:in `execute'
        /Users/dylangriffith/.local/share/mise/installs/ruby/3.3.7/lib/ruby/site_ruby/3.3.0/rubygems/command.rb:326:in `invoke_with_build_args'
        /Users/dylangriffith/.local/share/mise/installs/ruby/3.3.7/lib/ruby/site_ruby/3.3.0/rubygems/command_manager.rb:253:in `invoke_command'
        /Users/dylangriffith/.local/share/mise/installs/ruby/3.3.7/lib/ruby/site_ruby/3.3.0/rubygems/command_manager.rb:194:in `process_args'
        /Users/dylangriffith/.local/share/mise/installs/ruby/3.3.7/lib/ruby/site_ruby/3.3.0/rubygems/command_manager.rb:152:in `run'
        /Users/dylangriffith/.local/share/mise/installs/ruby/3.3.7/lib/ruby/site_ruby/3.3.0/rubygems/gem_runner.rb:57:in `run'
        /Users/dylangriffith/.local/share/mise/installs/ruby/3.3.7/bin/gem:12:in `<main>'
  Successfully installed bundler-2.6.5
  Parsing documentation for bundler-2.6.5
  make: *** [.gitlab-bundle] Error 1

  See /Users/dylangriffith/workspace/gdk/log/gdk/rake-2025-05-14_14-17-18_225/update-make-gitlab-bundle.log for the full log.

Setting up Anthropic API key...
rake aborted!
Errno::ENOENT: No such file or directory @ rb_sysopen - /Users/dylangriffith/workspace/gdk/gitlab-ai-gateway/.env (Errno::ENOENT)
/Users/dylangriffith/workspace/gdk/lib/tasks/setup_ai_gateway.rake:25:in `write'
/Users/dylangriffith/workspace/gdk/lib/tasks/setup_ai_gateway.rake:25:in `update_env_file'
/Users/dylangriffith/workspace/gdk/lib/tasks/setup_ai_gateway.rake:44:in `block in <top (required)>'
/Users/dylangriffith/workspace/gdk/lib/support/rake/task_with_spinner.rb:71:in `execute'
/Users/dylangriffith/workspace/gdk/lib/support/rake/task_with_logger.rb:30:in `execute'
/Users/dylangriffith/workspace/gdk/lib/support/rake/task_with_telemetry.rb:10:in `execute'
/Users/dylangriffith/workspace/gdk/lib/support/rake/task_with_spinner.rb:49:in `invoke'
/Users/dylangriffith/.local/share/mise/installs/ruby/3.3.7/bin/bundle:25:in `load'
/Users/dylangriffith/.local/share/mise/installs/ruby/3.3.7/bin/bundle:25:in `<main>'
Tasks: TOP => setup_ai_gateway
(See full trace by running task with --trace)

There seems to be some issue with bundler in there as well but I'm not sure what that means.

But I also see:

Errno::ENOENT: No such file or directory @ rb_sysopen - /Users/dylangriffith/workspace/gdk/gitlab-ai-gateway/.env (Errno::ENOENT)

And I can indeed see that there is no gitlab-ai-gateway directory created.