我试图设置我的React native项目,一切似乎都很好,但当我安装cd ios && pod install
时,它给了我以下错误。
/Library/Ruby/Site/2.6.0/rubygems.rb:264:in `find_spec_for_exe': can't find gem bundler (>= 0.a) with executable bundle (Gem::GemNotFoundException)
from /Library/Ruby/Site/2.6.0/rubygems.rb:283:in `activate_bin_path'
from /usr/bin/bundle:23:in `<main>'
我在过去的2-3天里尝试了很多解决方案,但不幸的是没有任何工作。
Terminal Command: ruby -v
Response: ruby 2.6.10p210 (2022-04-12 revision 67958) [universal.arm64e-darwin22]`
Terminal Command: gem update --system
Response: Latest version already installed.
Terminal Command: echo $PATH
Response: /opt/homebrew/bin:/opt/homebrew/sbin:/usr/local/bin:/System/Cryptexes/App/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Library/Apple/usr/bin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/local/bin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/bin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/appleinternal/bin:/opt/homebrew/bin:/opt/homebrew/sbin:/Users/dinar/.rvm/bin
请帮
1条答案
按热度按时间ej83mcc01#
Bundler不是Ruby的一部分,需要单独安装。
运行
gem install bundler
安装Bundler,然后使用bundle -v
检查安装情况,它将返回已安装的Bundler版本号。