它是什么意思,我该如何解决它:
pod install
/Library/Ruby/Site/2.0.0/rubygems.rb:250:in `find_spec_for_exe': can't find gem cocoapods (>= 0.a) (Gem::GemNotFoundException)
from /Library/Ruby/Site/2.0.0/rubygems.rb:278:in `activate_bin_path'
from /usr/local/bin/pod:22:in `<main>'
Run Code Online (Sandbox Code Playgroud) 我正在尝试将cocoapods安装到运行OSX 10.9.1(新的mavericks)的macbook pro中,并且在类型gem install cocoapodsI之后出现以下错误:
Building native extensions. This could take a while...
ERROR: Error installing cocoapods:
ERROR: Failed to build gem native extension.
"/usr/local/rvm/rubies/ruby-1.9.3-p194/bin/ruby" -rubygems /usr/local/rvm/gems/ruby-1.9.3-p194/gems/rake-10.1.1/bin/rake RUBYARCHDIR=/Users/rangreenberg/gems/gems/xcodeproj-0.14.1/ext RUBYLIBDIR=/Users/rangreenberg/gems/gems/xcodeproj-0.14.1/ext
/usr/local/rvm/rubies/ruby-1.9.3-p194/bin/ruby extconf.rb
checking for -std=c99 option to compiler... *** extconf.rb failed ***
Could not create Makefile due to some reason, probably lack of
necessary libraries and/or headers. Check the mkmf.log file for more
details. You may need configuration options.
Provided configuration options:
--with-opt-dir
--with-opt-include
--without-opt-include=${opt-dir}/include
--with-opt-lib
--without-opt-lib=${opt-dir}/lib
--with-make-prog
--without-make-prog …Run Code Online (Sandbox Code Playgroud) 我有 catalina OS 10.15.7 和 XCode 版本 12.4 (12D4e) 我正在尝试使用 gem 安装 cocoapods:
sudo gem install cocoapods
Run Code Online (Sandbox Code Playgroud)
我收到此错误:
ERROR: While executing gem ... (Gem::FilePermissionError)
You don't have write permissions for the /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/gems/2.6.0 directory.
Run Code Online (Sandbox Code Playgroud)
解决这个问题真是一场噩梦。我尝试使用brew install。Brew 能够安装它。但吊舱不起作用。当我使用简单的命令时,例如
pod init
or
pod -v
Run Code Online (Sandbox Code Playgroud)
我收到此错误:
Traceback (most recent call last):
16: from /usr/local/Cellar/cocoapods/1.11.2_1/libexec/bin/pod:23:in `<main>'
15: from /Library/Ruby/Site/2.6.0/rubygems.rb:285:in `activate_bin_path'
14: from /Library/Ruby/Site/2.6.0/rubygems.rb:285:in `synchronize'
13: from /Library/Ruby/Site/2.6.0/rubygems.rb:286:in `block in activate_bin_path'
12: from /Library/Ruby/Site/2.6.0/rubygems/specification.rb:1369:in `activate'
11: from /Library/Ruby/Site/2.6.0/rubygems/specification.rb:1387:in `activate_dependencies'
10: from /Library/Ruby/Site/2.6.0/rubygems/specification.rb:1387:in `each'
9: from /Library/Ruby/Site/2.6.0/rubygems/specification.rb:1405:in …Run Code Online (Sandbox Code Playgroud) 情况:
我正在尝试设置 Cocoapods。
我使用的是 OSX 12.2。我已经用 Homebrew 安装了 Ruby。当我跑步时gem list minitest (5.15.0)列出。
在终端中运行pod setup失败,因为它无法minitest (>=5.1)在 39 个宝石中找到。
我注意到搜索到的目录看起来是 OSX 系统 ruby 安装位置Library/Ruby/Site/2.6.0;而不是我用 Homebrew 安装的ruby 3.1.0(at )。/usr/local/opt/ruby/bin/ruby
我假设我需要做的是将终端指向ruby 3.1.0; 但是,我仔细检查了我的 .zhsrc 文件,它看起来是有序的(我是通过阅读 SO 问题以及 Ruby 和 Cocoapods 设置指南了解到这一点的 - 所以我对此可能是非常错误的)。
这是以下内容.zhsrc:
export PATH="/usr/local/sbin:$PATH"
# The next line updates PATH for the Google Cloud SDK.
if [ -f '/Users/sean/Desktop/google-cloud-sdk/path.zsh.inc' ]; then . '/Users/sean/Desktop/google-cloud-sdk/path.zsh.inc'; fi
# The next …Run Code Online (Sandbox Code Playgroud)