-
Notifications
You must be signed in to change notification settings - Fork 0
/
atom.xml
226 lines (178 loc) · 8.46 KB
/
atom.xml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
<title><![CDATA[Category: cocoapods | Cocoa Factory]]></title>
<link href="http://cocoa-factory.github.com/blog/categories/cocoapods/atom.xml" rel="self"/>
<link href="http://cocoa-factory.github.com/"/>
<updated>2013-03-23T00:37:38-05:00</updated>
<id>http://cocoa-factory.github.com/</id>
<author>
<name><![CDATA[Alan Duncan]]></name>
</author>
<generator uri="http://octopress.org/">Octopress</generator>
<entry>
<title type="html"><![CDATA[troubleshooting cocoapods installation]]></title>
<link href="http://cocoa-factory.github.com/blog/2013/02/01/troubleshooting-cocoapods-installation/"/>
<updated>2013-02-01T04:49:00-06:00</updated>
<id>http://cocoa-factory.github.com/blog/2013/02/01/troubleshooting-cocoapods-installation</id>
<content type="html"><![CDATA[<p><a href="http://cocoapods.org/?q=rvm%20sy#">CocoaPods</a> is a popular new way to manage dependencies in Xcode projects.</p>
<h4>Canonical installation</h4>
<p>CocoaPods is installed as a ruby gem; and usually everything 'just works.' Here's how you install CocoaPods:</p>
<p><code>bash
$ sudo gem install cocoapods
</code></p>
<p>If everything works properly, you should see something like this:
<code>
Fetching: i18n-0.6.1.gem (100%)
Fetching: multi_json-1.5.0.gem (100%)
Fetching: activesupport-3.2.11.gem (100%)
Fetching: colored-1.2.gem (100%)
Fetching: xcodeproj-0.4.2.gem (100%)
Building native extensions. This could take a while...
Fetching: multipart-post-1.1.5.gem (100%)
Fetching: faraday-0.8.4.gem (100%)
Fetching: addressable-2.3.2.gem (100%)
Fetching: faraday_middleware-0.9.0.gem (100%)
Fetching: hashie-1.2.0.gem (100%)
Fetching: netrc-0.7.7.gem (100%)
Fetching: octokit-1.22.0.gem (100%)
Fetching: escape-0.0.4.gem (100%)
Fetching: json-1.7.6.gem (100%)
Building native extensions. This could take a while...
Fetching: open4-1.3.0.gem (100%)
Fetching: rake-0.9.6.gem (100%)
Fetching: cocoapods-0.16.1.gem (100%)
Successfully installed i18n-0.6.1
Successfully installed multi_json-1.5.0
Successfully installed activesupport-3.2.11
Successfully installed colored-1.2
Successfully installed xcodeproj-0.4.2
Successfully installed multipart-post-1.1.5
Successfully installed faraday-0.8.4
Successfully installed addressable-2.3.2
Successfully installed faraday_middleware-0.9.0
Successfully installed hashie-1.2.0
Successfully installed netrc-0.7.7
Successfully installed octokit-1.22.0
Successfully installed escape-0.0.4
Successfully installed json-1.7.6
Successfully installed open4-1.3.0
Successfully installed rake-0.9.6
Successfully installed cocoapods-0.16.1
17 gems installed
Installing ri documentation for i18n-0.6.1...
Installing ri documentation for multi_json-1.5.0...
Installing ri documentation for activesupport-3.2.11...
Installing ri documentation for colored-1.2...
Installing ri documentation for xcodeproj-0.4.2...
Installing ri documentation for multipart-post-1.1.5...
Installing ri documentation for faraday-0.8.4...
Installing ri documentation for addressable-2.3.2...
Installing ri documentation for faraday_middleware-0.9.0...
Installing ri documentation for hashie-1.2.0...
Installing ri documentation for netrc-0.7.7...
Installing ri documentation for octokit-1.22.0...
Installing ri documentation for escape-0.0.4...
Installing ri documentation for json-1.7.6...
Installing ri documentation for open4-1.3.0...
Installing ri documentation for rake-0.9.6...
Installing ri documentation for cocoapods-0.16.1...
Installing RDoc documentation for i18n-0.6.1...
Installing RDoc documentation for multi_json-1.5.0...
Installing RDoc documentation for activesupport-3.2.11...
Installing RDoc documentation for colored-1.2...
Installing RDoc documentation for xcodeproj-0.4.2...
Installing RDoc documentation for multipart-post-1.1.5...
Installing RDoc documentation for faraday-0.8.4...
Installing RDoc documentation for addressable-2.3.2...
Installing RDoc documentation for faraday_middleware-0.9.0...
Installing RDoc documentation for hashie-1.2.0...
Installing RDoc documentation for netrc-0.7.7...
Installing RDoc documentation for octokit-1.22.0...
Installing RDoc documentation for escape-0.0.4...
Installing RDoc documentation for json-1.7.6...
Installing RDoc documentation for open4-1.3.0...
Installing RDoc documentation for rake-0.9.6...
Installing RDoc documentation for cocoapods-0.16.1...
</code></p>
<h4>Failed installation</h4>
<p>However, CocoaPods installation can fail for a number of reasons. Here are a few things to check if the installation fails:</p>
<ul>
<li><p><strong>Have you installed the Xcode command line tools?</strong> If you update Xcode, then you need to re-download the command line tools. This is a common gotcha.</p></li>
<li><p><strong>Are you using MacRuby?</strong> MacRuby is not supported. Your ruby should be Ruby MRI 1.8.7 or 1.9.3</p></li>
</ul>
<h4>Errors during installation</h4>
<p>Our initial attempt with <code>sudo gem install cocoapods</code> gave the following error:</p>
<p><code>`` bash
/usr/local/lib/ruby/1.9.1/yaml.rb:56:in</code><top (required)>':
It seems your ruby installation is missing psych (for YAML output).
To eliminate this warning, please install libyaml and reinstall your ruby.
ERROR: Loading command: install (LoadError)</p>
<pre><code>cannot load such file -- zlib
</code></pre>
<p>ERROR: While executing gem ... (NameError)</p>
<pre><code>uninitialized constant Gem::Commands::InstallCommand
</code></pre>
<p><code>``
First, we tried to just install the libyaml package with</code>rvm pkg install libyaml<code>but this got us nowhere. Same error when we try to</code>sudo gem install cocoapods`.</p>
<p>Since we weren't using ruby for anything else on the system, blowing away RVM seemed like a benign (if nuclear) option. So we used <code>rvm implode</code> and removed all references to <code>.rvm</code> in our PATH. You need to also take a look at <code>.bashrc</code> <code>.profile</code> and <code>.bash_profile</code> for other references to rvm if you want to try this option. See the accepted answer to <a href="http://stackoverflow.com/questions/3558656/how-to-remove-rvm-ruby-version-manager-from-my-system">this question</a> for details on the nuclear option for removing <code>rvm</code>.</p>
<p>Next we reinstalled <code>rvm</code>:</p>
<p><code>bash
curl -L https://get.rvm.io | bash -s stable --ruby
</code></p>
<p>This installs <code>rvm</code> and the latest stable version of ruby. Next update the terminal and check the version of ruby in use:</p>
<p><code>bash
Darwin:~ alan$ source /usr/local/rvm/scripts/rvm
Darwin:~ alan$ which ruby
</code></p>
<p>Hmmm....we're still using the system ruby. Let's see what ruby versions we have:</p>
<p>``` bash
Darwin:~ alan$ rvm list</p>
<p>A RVM version 1.18.5 (stable) is installed yet 1.15.7 (stable) is loaded.
Please do one of the following:
* 'rvm reload'
* open a new shell
* 'echo rvm_auto_reload_flag=1 >> ~/.rvmrc' # for auto reload with msg.
* 'echo rvm_auto_reload_flag=2 >> ~/.rvmrc' # for silent auto reload.
```</p>
<p>So, let's do as it says and reload:</p>
<p>``` bash
Darwin:~ alan$ rvm reload
RVM reloaded!
Darwin:~ alan$ rvm list</p>
<p>rvm rubies</p>
<p> ruby-1.9.3-p194 [ x86_64 ]
=* ruby-1.9.3-p374 [ x86_64 ]</p>
<h1>=> - current</h1>
<h1>=* - current && default</h1>
<h1>* - default</h1>
<p>```</p>
<p>Now we can confirm the ruby version in use:</p>
<p><code>bash
Darwin:~ alan$ which ruby
/usr/local/rvm/rubies/ruby-1.9.3-p374/bin/ruby
</code></p>
<p>So we should be good to go. Let's try installing CocoaPods again:</p>
<p>``` bash
Darwin:~ alan$ sudo gem install cocoapods
Fetching: i18n-0.6.1.gem (100%)
Fetching: multi_json-1.5.0.gem (100%)
Fetching: activesupport-3.2.11.gem (100%)
Fetching: colored-1.2.gem (100%)
Fetching: xcodeproj-0.4.2.gem (100%)</p>
<h1>many more lines follow...</h1>
<p>```</p>
<p>Success! Now back to the canonical installation:</p>
<p><code>bash
Darwin:~ alan$ pod setup
Setting up CocoaPods master repo
Cloning spec repo `master' from `https://github.com/CocoaPods/Specs.git' (branch `master')
Setup completed (read-only access)
</code>
```</p>
<h4>Conclusion</h4>
<p>For developers with more experience dealing with ruby, its versions and dependencies, deleting rvm and reinstalling may seem like a blunt instrument. For me, this worked well and allowed us to start working with CocoaPods after a lot of earlier frustration.</p>
<h4>Questions/comments?</h4>
<p>I'd love to hear from you at <code>@NSBum</code>.</p>
]]></content>
</entry>
</feed>