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

GEM Error - google-api-client-0.38.0 requires ruby version ~> 2.4, which is incompatible with the current version, ruby 3.0.2p107

当 运行 bundle install 我收到这个错误:

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

找不到 fix/reason,请在下面回答(我想 post 这可以帮助某人 else/took 我花 1 小时找到修复)。

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

bundle update