Could not locate Gemfile

I’m stuck on Stage #ZV2.

I’ve tried to find similar problems on that stage:

Here are my logs from test run:

[compile] Moved ./.codecrafters/run.sh → ./your_program.sh
[compile] Compilation successful.
Debug = true
[tester::#ZV2] Running tests for Stage #ZV2 (Filename Completion - File completion)
[tester::#ZV2] [working_dir] - pineapple-71.txt
[tester::#ZV2] Running ./your_program.sh
[your-program] Could not locate Gemfile
[tester::#ZV2] ^ Expected prompt ("$ ") but received "Could not locate Gemfile"
[tester::#ZV2] Test failed

And here’s a snippet of .codecrafters/run.sh:

#!/bin/sh
#
# This script is used to run your program on CodeCrafters
#
# This runs after .codecrafters/compile.sh
#
# Learn more: https://codecrafters.io/program-interface

set -e # Exit on failure

exec bundle exec ruby app/main.rb "$@"

Hi, thanks for your post!

I’m currently out of the office and will be back on March 23. I’ll get back to you as soon as possible once I return.

Found the issue and this fix worked fine.

It required to change .codecrafters/run.sh to this:

set -e # Exit on failure

SCRIPT_DIR=$(dirname "$0")
export BUNDLE_GEMFILE="$SCRIPT_DIR/Gemfile"

exec bundle exec ruby "$SCRIPT_DIR/app/main.rb" "$@"

I assume that such change would be better to note in the first task of file completion module, so devs could check their CI script.