Mac终端的ruby和pods安装和使用(超干货)
2016-07-28 18:09
337 查看
*********上部分是:Ruby的安装****************1.安装RVM$ curl -L https://get.rvm.io | bash -s stable2.载入rvm$ source ~/.rvm/scripts/rvm$ rvm -v3.安装Ruby$ rvm list known$ rvm install 2.0.0$ rvm list$ rvm remove 1.0.04.设置Ruby版本$ rvm 2.0.0 --default$ rvm -v$ gem -v5.看是不是设置ruby成功Ruby默认源使用的是cocoapods.org,被墙了,有一种解决方案是将源替换为淘宝的
$ gem source -r https://rubygems.org/
$ gem source -a https://ruby.taobao.org
$ gem sources -l
*********中部分是:pods的安装****************1. 安装pods
安装 CocoaPods(os x 10.11以以下)$ sudo gem install -n /usr/local/bin cocoapods
安装 CocoaPods(os x 10.11或以上)$ sudo gem install -n /usr/local/bin cocoapods
2.检查是否安装成功$ pod setup $ pod install 或 pod update即可
3.检查库内容是否存在$ pod search SDWebImage
***4.当在update或install时遇到这个问题***
Unable to find a specification for `xxxxx (~> 1.x.x)` depended upon by Podfile.
只需要把当前Pod的目录清理一下就行了。在终端执行以下命令:pod repo remove master
pod setup
setup成功后执行install或update即可。
*********下部分是:pods的使用****************1.操作的步骤1-1.cd DeskTtop/1-2.cd XX(是指项目名)1-3.vim Pofile(是编辑加入库名字)1-4.编辑按i键。输入,比如:platform :ios, '8.0'use_frameworks!
target 'App' do.......(App是指自己项目的) pod 'AFNetworking', '~> 2.6' pod 'ORStackView', '~> 3.0' pod 'SwiftyJSON', '~> 2.3'endend结束按esc键退出编辑,按:( 冒号),输入wq最后按enter键最最后:pod install或者pod update
备注:查看单前的路径:pwd 退出编辑:c d ../ 查看内容:ls
$ gem source -r https://rubygems.org/
$ gem source -a https://ruby.taobao.org
$ gem sources -l
*********中部分是:pods的安装****************1. 安装pods
安装 CocoaPods(os x 10.11以以下)$ sudo gem install -n /usr/local/bin cocoapods
安装 CocoaPods(os x 10.11或以上)$ sudo gem install -n /usr/local/bin cocoapods
2.检查是否安装成功$ pod setup $ pod install 或 pod update即可
3.检查库内容是否存在$ pod search SDWebImage
***4.当在update或install时遇到这个问题***
Unable to find a specification for `xxxxx (~> 1.x.x)` depended upon by Podfile.
只需要把当前Pod的目录清理一下就行了。在终端执行以下命令:pod repo remove master
pod setup
setup成功后执行install或update即可。
*********下部分是:pods的使用****************1.操作的步骤1-1.cd DeskTtop/1-2.cd XX(是指项目名)1-3.vim Pofile(是编辑加入库名字)1-4.编辑按i键。输入,比如:platform :ios, '8.0'use_frameworks!
target 'App' do.......(App是指自己项目的) pod 'AFNetworking', '~> 2.6' pod 'ORStackView', '~> 3.0' pod 'SwiftyJSON', '~> 2.3'endend结束按esc键退出编辑,按:( 冒号),输入wq最后按enter键最最后:pod install或者pod update
备注:查看单前的路径:pwd 退出编辑:c d ../ 查看内容:ls
相关文章推荐
- source命令执行SQL脚本文件
- Patrol 7 架构下?的处理方法
- 中病毒后常用的解决方法病毒终极解决方案
- 方便的IE源代码工具Instant Source
- QQ尾巴 InfoMs.Ime 解决方案
- 解决Default storage engine (InnoDB) is not available导致mysql无法启动的修改办法
- IE对CSS样式表的限制分析与解决方案
- 浅析c#范型中的特殊关键字where & default
- 开源MySQL高效数据仓库解决方案:Infobright详细介绍
- MySQL之Field‘***’doesn’t have a default value错误解决办法
- 惊现支撑1亿pv/天的超级数据库解决方案
- mysql source 命令导入大的sql文件的方法
- Mysql导入导出工具Mysqldump和Source命令用法详解
- 关于bluehost空间上wordpress后台变为英文的解决方案
- select * from sp_who的解决方案
- Default style sheet for HTML 4
- 简析Oracle数据库常见问题及解决方案
- php+mysql大量用户登录解决方案分析
- 常见PHP数据库解决方案分析介绍
- MongoDB错误32-bit servers don't have journaling enabled by default解决方法