测试工程中引入Masonry记录

测试工程中需要引入Masonry,在进行添加新库时发现了几个问题,记录如下,方便有相同问题的朋友查找解决:
 
1,podfile中添加 pod ‘Masonry’ 后,pod install --verbose --no-repo-update 报错
 
报错内容如链接:
关键字:
――― MARKDOWN TEMPLATE ―――――――――――――
### Command
### Report
### Stack
### Plugins
### Podfile
### Error
 
――― TEMPLATE END ―――――
 
[!] Oh no, an error occurred.
 
原因及解决方案:
由于Mac系统升级愿意,gem需要更新
$ sudo gem update --system
$ sudo gem install cocoapods -n/usr/local/bin
 
2,更新gem报错
 
ERROR:  While executing gem ... (Gem::RemoteFetcher::FetchError)
    bad response Not Found 404 (https://gems.ruby-china.org/specs.4.8.gz)
 
 
原因及解决方案:
rubygems官网网址变成:https://gems.ruby-china.com/
需要更新安装源地址
$ gem sources -remove https://gems.ruby-china.org/
 
注意:删除安装源时不要忘记在地址后面加”/“,否则删除无效
错误信息:source https://gems.ruby-china.org not present in cache
 
更新安装源之后
1,更新gem
2,pod install --verbose --no-repo-update 
完成Masonry的导入
 
参考资料:
原文地址:https://www.cnblogs.com/huaida/p/11125776.html