Java home can't be set after upgrade to xcode 13

Hi
I have an issue since we upgrade the yml file to xcode 13.
The builds start to fail on a job where I set java home with this error
and this is the jobs that I try to run:

Did anyone has an idea what I am missing?
The builds work fine with the previous xcode version 12.3.0
Thanks

It looks like Ruby is not being set correctly. Try replacing your Ruby command with the following:

https://circleci.com/docs/2.0/testing-ios/#images-using-xcode-117-and-later