npx react-native@latest init 安装 ruby gems 时出错

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

尝试在 M1 Mac 上创建 React Native CLI 应用程序时,安装 Ruby Gems 时发生错误:

✖ Installing Ruby Gems
error There was an error while trying to write to
/Users/maciejwiacek/.bundle/cache/compact_index/rubygems.org.443.29b0360b937aa4d161703e6160654e47/versions.61581.tmp.
It is likely that you need to grant write permissions for that path.
✖ Installing Ruby Gems
error Looks like your iOS environment is not properly set. Please go to https://reactnative.dev/docs/environment-setup?os=macos&platform=android and follow the React Native CLI QuickStart guide for macOS and iOS.

我尝试重新安装我的 macos、cocoapods、ruby 版本、homebrew、watchman 等。

ruby react-native rubygems react-native-cli
1个回答
0
投票

你有红宝石和可可足类吗? 官方指南说在某些情况下你需要使用

sudo
。我正在使用通过本指南安装的Ruby版本管理器,但以前我只是用
sudo
完成我的工作,即使许多人不鼓励这种做法。

© www.soinside.com 2019 - 2024. All rights reserved.