gem

最新版 CocoaPods 的安装流程

筅森魡賤 提交于 2019-12-09 10:14:15
iOS 最新版 CocoaPods 的安装流程 1.移除现有Ruby默认源 $gem sources --remove https://rubygems.org/ 2.使用新的源 $gem sources -a https://ruby.taobao.org/ 3.验证新源是否替换成功 $gem sources -l 4.安装CocoaPods (1) $sudo gem install cocoapods 备注:苹果系统升级 OS X EL Capitan 后改为 $sudo gem install -n /usr/local/bin cocoapods (2) $pod setup 5.更新gem $sudo gem update --system 6. 新建工程,并在终端用cd指令到文件夹内 $pod search 第三方 7.新建文件 vim “Podfile”, $vim Podfile 写入以下内容并保存 小提示:(终端vim文件 按 i 可编辑 ,esc 退出编辑,:wq 可保存退出) platform:ios, '6.0' pod 'AFNetworking', '~> 2.3.1' <-------第三方 8.导入第三方库 $pod install 9.退出终端 以下是我用以前的安装流程安装时出现的一些错误 终端 cocoapods 下载bug调试: 错误1:

安装和使用cocopods

喜欢而已 提交于 2019-12-09 10:13:45
最新版 CocoaPods 的安装流程 原文 http://www.cnblogs.com/zxs-19920314/p/4985476.html iOS 最新版 CocoaPods 的安装流程 1.移除现有Ruby默认源 $gem sources --remove https://rubygems.org/ 2.使用新的源 $gem sources -a https://ruby.taobao.org/ 3.验证新源是否替换成功 $gem sources -l 4.安装CocoaPods (1) $sudo gem install cocoapods 备注:苹果系统升级 OS X EL Capitan 后改为 $sudo gem install -n /usr/local/bin cocoapods (2) $pod setup 5.更新gem $sudo gem update --system 6. 新建工程,并在终端用cd指令到文件夹内 $pod search 第三方 7.新建文件 vim “Podfile”, $vim Podfile 写入以下内容并保存 小提示:(终端vim文件 按 i 可编辑 ,esc 退出编辑,:wq 可保存退出) platform:ios, '6.0' target '项目名' do (最新版的pods podfile文件依赖target信息不能省)

iOS cocoapods升级及问题

早过忘川 提交于 2019-12-09 10:11:45
安装 安装Ruby CocoaPods基于Ruby语言开发而成,因此安装CocoaPods前需要安装Ruby环境。幸运的是Mac系统默认自带Ruby环境,如果没有请自行查找安装。检测是否安装Ruby: $ gem -v2.0.14 安装则会提示当前Ruby版本。gem介绍:gem是一个管理Ruby库和程序的标准包,它通过Ruby Gem(如 http://rubygems.org/ )源来查找、安装、升级和卸载软件包,非常的便捷。 更换gem源 因为国内网络的问题导致gem源间歇性中断,原因你懂的。因此我们需要更换gem源,使用淘宝的gem源 [https://ruby.taobao.org/.](https://ruby.taobao.org/%E3%80%82) 第一步:移除默认的源 gem sources --remove https://rubygems.org/ 第二步:指定淘宝的源 gem sources -a https://ruby.taobao.org/ 第三步:查看指定的源是不是淘宝源 $ gem sources -l *** CURRENT SOURCES *** https://ruby.taobao.org/ 如果是 https://ruby.taobao.org/,则更换成功。 安装CocoaPods 改成淘宝源后执行以下命令进行安装: sudo gem

更新CocoaPods碰到的问题及知识点

谁都会走 提交于 2019-12-09 10:11:26
1:解决CocoaPods安装时报的问题,http://ruby.taobao.org/latest_specs.4.8.gz 报404 解决 bad response Not Found 404 (http://ruby.taobao.org/latest_specs.4.8.gz) 原因: 淘宝的那个镜像(https://ruby.taobao.org/ )已经不可用了。所以我们现在用最新支持的ruby镜像(https://gems.ruby-china.org/) gem sources --remove https://ruby.taobao.org/ gem sources -a https://gems.ruby-china.org/ gem sources -l sudo gem install -n /usr/local/bin cocoapods 当然如果你是第一次安装时(目前网上有些安装资料可能还指向淘宝的http): gem sources -l gem sources --remove https://rubygems.org/ gem sources -a https://gems.ruby-china.org/ gem sources -l sudo gem install -n /usr/local/bin cocoapods 1.1 $ gem

cannot install ruby gems - zlib error

对着背影说爱祢 提交于 2019-12-09 09:44:44
问题 I'm trying to install some Ruby Gems so I can use Ruby to notify me when I get twitter messages. However, after doing a gem update --system , I now get a zlib error every time I try and do a gem install of anything. below is the console output I get when trying to install ruby gems. (along with the output from gem environment ). C:\data\ruby>gem install twitter ERROR: While executing gem ... (Zlib::BufError) buffer error C:\data\ruby>gem update --system Updating RubyGems ERROR: While

What does it mean BUNDLE_DISABLE_SHARED_GEMS: '1'?

和自甴很熟 提交于 2019-12-09 07:48:43
问题 I found BUNDLE_DISABLE_SHARED_GEMS: '1' , in .bundle/config . What does it mean? 回答1: Bundler takes some settings from the ~/.bundle/config file -- not from the shell env. When set to true (default), the install of all gems will be to BUNDLE_PATH , regardless of whether those gems are installed in your system. Bundler will not install gems already in system gems by default, so this is especially useful if you're trying to package up an application with all dependencies unpacked. 回答2: That

How to safely fix “invalid date format in specification” for webrobots-0.0.10.gemspec

て烟熏妆下的殇ゞ 提交于 2019-12-09 07:12:43
问题 For every gem execution I am receiving the following error: Invalid gemspec in [...rvm/gems/ruby-1.9.2-p136/specifications/webrobots-0.0.10.gemspec]: invalid date format in specification: "2011-07-01 00:00:00.000000000Z" I am not the webrobots maintainer and I can't uninstall that gem. There is any safe action to fix this problem on a production server? 回答1: These days with Github and Bundler you don't have to be a maintainer in order to fix issues in the gems you're using. Just fork the

“PHP Composer” compared with “Ruby Gems and Bundler”

醉酒当歌 提交于 2019-12-09 05:47:39
问题 (As first, this question is not "which is better" question. I just want to know how they are similar and differ in functionality perspective.) I'm php developer and currently learning ruby . In these days, many php developers are encouraged to use Composer for dependency management. Before asking questions, I would like to validate my knowledge first. According to my understanding, Composer is a dependency management tool for php libraries (or packages). Composer installed php library per

How to convert a large gem to standalone rails app

旧城冷巷雨未停 提交于 2019-12-09 03:49:27
问题 I'm building a social network and have been using the gem community_engine but have been having trouble implementing the large amount of customization that I need for my app. I figure this will make it easier for me to override and add methods, as well as help me to better understand and learn from the code since I will be able to actually see all of it in action. So far in my attempt I downloaded the source code, added the default bin directory and config files that were missing, as well ass

can't setup ruby environment - installing fii gem error

女生的网名这么多〃 提交于 2019-12-09 01:45:49
问题 I'm trying to setup environtment for ruby project. But when I run 'bundle', I have error during installing 'fii' gem: Installing ffi (1.8.1) Gem::Installer::ExtensionBuildError: ERROR: Failed to build gem native extension. /Users/bmalets/.rvm/rubies/ruby-1.9.3-p448/bin/ruby extconf.rb checking for ffi.h... *** 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