Issue with Ruby in CICD environment on Linux: usrbinenv: 'ruby.exe': No such file or directory - Stack Overflow

时间: 2025-01-06 admin 业界

I am facing an issue when running my tests and lint checks on GitHub Actions. The error that appears is:

/usr/bin/env: 'ruby.exe': No such file or directory.

I am developing on Windows, but the CI/CD environment uses Linux. It seems the system is looking for ruby.exe, which is specific to Windows. I have set up Ruby on my local machine, but that doesn't affect the CI/CD environment. Here is a snippet of the error log:

Run bin/rubocop -f github/usr/bin/env: 'ruby.exe': No such file or directoryError: Process completed with exit code 127.

I checked the configuration of the GitHub Actions workflow file.

I researched issues related to Linux environments in CI/CD.