GEM 错误 - google-api-client-0.38.0 需要 ruby​​ 版本 ~> 2.4,与当前版本 ruby​​ 3.0.2p107 不兼容

spu*_*n1k 12 macos terminal rubygems ios

运行 捆绑安装时,我收到此错误:

Fetching gem metadata from https://rubygems.org/
Fetching gem metadata from https://rubygems.org/........
google-api-client-0.38.0 requires ruby version ~> 2.4, which is incompatible
with the current version, ruby 3.0.2p107
Run Code Online (Sandbox Code Playgroud)

找不到修复/原因,请在下面回答(我想发布此内容是为了帮助其他人/花了我 1 小时才找到修复)。

spu*_*n1k 21

运行(通过终端)修复它:

bundle update
Run Code Online (Sandbox Code Playgroud)