环境如下
➜ ~ ruby --version
ruby 2.0.0p648 (2015-12-16 revision 53162) [universal.x86_64-darwin16]
➜ ~ gem --version
2.6.7
➜ ~ pod --version
1.1.1
cocoapods安装和setup也都成功了。
Podfile编写如下:
platform :ios, '8.0'
use_frameworks!
target 'ZPassword' do
pod 'SDWebImage', '~> 4.0.0-beta2'
end
执行pod install结果如下:
➜ ZPassword pod install
Analyzing dependencies
Downloading dependencies
Installing SDWebImage (4.0.0-beta2)
Generating Pods project
[1] 18912 abort pod install
➜ ZPassword
没有警告没有报错
文件夹中有生成Pods文件夹且里面有下载好的库文件
但是没有生成对应的xcworkspace文件
没有podfile.lock文件
目录如下图:
求解....
PHPz2017-04-18 09:53:16
I feel so good after uninstalling and reinstalling
sudo gem uninstall cocoapods
sudo gem install cocoapods --pre
高洛峰2017-04-18 09:53:16
Hello! Is your problem solved? Mine is exactly the same as yours, and my Ruby is 2.0 by default. I need to update it to 2.2.2 or later version
阿神2017-04-18 09:53:16
Hello, I encountered the same problem recently. My reason is because the local Ruby-2.0.0 environment version is too low.
A minimum Ruby environment of Ruby-2.2.2 or above is required. This problem can be solved by upgrading the Ruby environment to Ruby-2.3.3 version (or any higher version).
If you want to upgrade the Ruby environment that comes with Mac, you need to use RVM. You can refer to my blog:
https://www.lewanny.com/updat...