/Library/Ruby/Gems/2.6.0/gems/cocoapods-core-1.10.1/lib/cocoapods-core/podfile.rb:318:in `rescue in block in from_ruby'
我把ruby升级到了2.7.2,但是还是报了Ruby2.6.0的错误,根本原因是cocoapods是以前的老ruby安装的,解决方案是卸载cocoapods,通过新ruby版本重新安装。
sudo gem uninstall cocoapods
gem install cocoapods