Fixing the cannot load such file -- xcodeproj Error in Ruby

If you’re working on a project that interacts with Xcode or uses Ruby scripts and encountered the following error: