在 mac 上使用 VScode 进行 flutter - 安装 cocoapods 错误

问题描述 投票:0回答:1

我有这个错误,我很努力地修复但并不幸运.. 1-我想在 mac iPhone 项目上为我的 flutter 安装 cocoa-pods 2-但是系统告诉我必须安装ruby,但是当我尝试安装ruby时遇到了问题

注意:我的英语很差,所以请一步一步给我步骤,我的意思是命令..

(base) Nonia@Saeeds-MacBook-Pro home_wid %  sudo gem uninstall cocoapods && sudo gem install cocoapods

Password:
Gem 'cocoapods' is not installed
ERROR:  Error installing cocoapods:
        The last version of drb (>= 0) to support your Ruby & RubyGems was 2.0.6. Try installing it with `gem install drb -v 2.0.6` and then running the current command again
        drb requires Ruby version >= 2.7.0. The current ruby version is 2.6.10.210.
(base) Nonia@Saeeds-MacBook-Pro home_wid % gem install drb -v 2.0.6
ERROR:  While executing gem ... (Gem::FilePermissionError)
    You don't have write permissions for the /Library/Ruby/Gems/2.6.0 directory.

VScode errors

ruby flutter
1个回答
0
投票

尝试以下步骤:

  1. 安装

    drb
    版本2.0.6:

    gem install drb -v 2.0.6
    
  2. 然后,安装CocoaPods:

    sudo gem install cocoapods
    
© www.soinside.com 2019 - 2024. All rights reserved.