Skip to content

Commit 9fd7216

Browse files
committedOct 23, 2023
feat: update ruby version、rbenv、pods
1 parent 6135dfb commit 9fd7216

File tree

4 files changed

+68
-47
lines changed

4 files changed

+68
-47
lines changed
 

‎.ruby-version

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
2.7.7
1+
3.2.2

‎Gemfile

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# frozen_string_literal: true
22

3-
source "https://rubygems.org"
3+
source "https://gems.ruby-china.com/"
44

5-
gem "cocoapods", "1.11.3"
5+
gem "cocoapods", "1.13.0"
66
gem "fastlane", "2.211.0"

‎Gemfile.lock

+47-40
Original file line numberDiff line numberDiff line change
@@ -1,59 +1,65 @@
11
GEM
2-
remote: https://rubygems.org/
2+
remote: https://gems.ruby-china.com/
33
specs:
44
CFPropertyList (3.0.6)
55
rexml
6-
activesupport (6.1.7.3)
6+
activesupport (7.1.1)
7+
base64
8+
bigdecimal
79
concurrent-ruby (~> 1.0, >= 1.0.2)
10+
connection_pool (>= 2.2.5)
11+
drb
812
i18n (>= 1.6, < 2)
913
minitest (>= 5.1)
14+
mutex_m
1015
tzinfo (~> 2.0)
11-
zeitwerk (~> 2.3)
12-
addressable (2.8.1)
16+
addressable (2.8.5)
1317
public_suffix (>= 2.0.2, < 6.0)
1418
algoliasearch (1.27.5)
1519
httpclient (~> 2.8, >= 2.8.3)
1620
json (>= 1.5.1)
1721
artifactory (3.0.15)
1822
atomos (0.1.3)
1923
aws-eventstream (1.2.0)
20-
aws-partitions (1.731.0)
21-
aws-sdk-core (3.170.1)
24+
aws-partitions (1.839.0)
25+
aws-sdk-core (3.185.1)
2226
aws-eventstream (~> 1, >= 1.0.2)
2327
aws-partitions (~> 1, >= 1.651.0)
2428
aws-sigv4 (~> 1.5)
2529
jmespath (~> 1, >= 1.6.1)
26-
aws-sdk-kms (1.63.0)
27-
aws-sdk-core (~> 3, >= 3.165.0)
30+
aws-sdk-kms (1.72.0)
31+
aws-sdk-core (~> 3, >= 3.184.0)
2832
aws-sigv4 (~> 1.1)
29-
aws-sdk-s3 (1.119.1)
30-
aws-sdk-core (~> 3, >= 3.165.0)
33+
aws-sdk-s3 (1.136.0)
34+
aws-sdk-core (~> 3, >= 3.181.0)
3135
aws-sdk-kms (~> 1)
32-
aws-sigv4 (~> 1.4)
33-
aws-sigv4 (1.5.2)
36+
aws-sigv4 (~> 1.6)
37+
aws-sigv4 (1.6.0)
3438
aws-eventstream (~> 1, >= 1.0.2)
3539
babosa (1.0.4)
40+
base64 (0.1.1)
41+
bigdecimal (3.1.4)
3642
claide (1.1.0)
37-
cocoapods (1.11.3)
43+
cocoapods (1.13.0)
3844
addressable (~> 2.8)
3945
claide (>= 1.0.2, < 2.0)
40-
cocoapods-core (= 1.11.3)
46+
cocoapods-core (= 1.13.0)
4147
cocoapods-deintegrate (>= 1.0.3, < 2.0)
42-
cocoapods-downloader (>= 1.4.0, < 2.0)
48+
cocoapods-downloader (>= 1.6.0, < 2.0)
4349
cocoapods-plugins (>= 1.0.0, < 2.0)
4450
cocoapods-search (>= 1.0.0, < 2.0)
45-
cocoapods-trunk (>= 1.4.0, < 2.0)
51+
cocoapods-trunk (>= 1.6.0, < 2.0)
4652
cocoapods-try (>= 1.1.0, < 2.0)
4753
colored2 (~> 3.1)
4854
escape (~> 0.0.4)
4955
fourflusher (>= 2.3.0, < 3.0)
5056
gh_inspector (~> 1.0)
5157
molinillo (~> 0.8.0)
5258
nap (~> 1.0)
53-
ruby-macho (>= 1.0, < 3.0)
54-
xcodeproj (>= 1.21.0, < 2.0)
55-
cocoapods-core (1.11.3)
56-
activesupport (>= 5.0, < 7)
59+
ruby-macho (>= 2.3.0, < 3.0)
60+
xcodeproj (>= 1.23.0, < 2.0)
61+
cocoapods-core (1.13.0)
62+
activesupport (>= 5.0, < 8)
5763
addressable (~> 2.8)
5864
algoliasearch (~> 1.0)
5965
concurrent-ruby (~> 1.1)
@@ -76,17 +82,20 @@ GEM
7682
commander (4.6.0)
7783
highline (~> 2.0.0)
7884
concurrent-ruby (1.2.2)
85+
connection_pool (2.4.1)
7986
declarative (0.0.20)
80-
digest-crc (0.6.4)
87+
digest-crc (0.6.5)
8188
rake (>= 12.0.0, < 14.0.0)
8289
domain_name (0.5.20190701)
8390
unf (>= 0.0.5, < 1.0.0)
8491
dotenv (2.8.1)
92+
drb (2.1.1)
93+
ruby2_keywords
8594
emoji_regex (3.2.3)
8695
escape (0.0.4)
8796
ethon (0.16.0)
8897
ffi (>= 1.15.0)
89-
excon (0.99.0)
98+
excon (0.104.0)
9099
faraday (1.10.3)
91100
faraday-em_http (~> 1.0)
92101
faraday-em_synchrony (~> 1.0)
@@ -115,7 +124,7 @@ GEM
115124
faraday-retry (1.0.3)
116125
faraday_middleware (1.2.0)
117126
faraday (~> 1.0)
118-
fastimage (2.2.6)
127+
fastimage (2.2.7)
119128
fastlane (2.211.0)
120129
CFPropertyList (>= 2.3, < 4.0.0)
121130
addressable (>= 2.8, < 3.0.0)
@@ -155,13 +164,13 @@ GEM
155164
xcodeproj (>= 1.13.0, < 2.0.0)
156165
xcpretty (~> 0.3.0)
157166
xcpretty-travis-formatter (>= 0.0.3)
158-
ffi (1.15.5)
167+
ffi (1.16.3)
159168
fourflusher (2.3.1)
160169
fuzzy_match (2.0.4)
161170
gh_inspector (1.1.3)
162-
google-apis-androidpublisher_v3 (0.37.0)
171+
google-apis-androidpublisher_v3 (0.51.0)
163172
google-apis-core (>= 0.11.0, < 2.a)
164-
google-apis-core (0.11.0)
173+
google-apis-core (0.11.1)
165174
addressable (~> 2.5, >= 2.5.1)
166175
googleauth (>= 0.16.2, < 2.a)
167176
httpclient (>= 2.8.1, < 3.a)
@@ -190,29 +199,28 @@ GEM
190199
google-cloud-core (~> 1.6)
191200
googleauth (>= 0.16.2, < 2.a)
192201
mini_mime (~> 1.0)
193-
googleauth (1.3.0)
202+
googleauth (1.8.1)
194203
faraday (>= 0.17.3, < 3.a)
195204
jwt (>= 1.4, < 3.0)
196-
memoist (~> 0.16)
197205
multi_json (~> 1.11)
198206
os (>= 0.9, < 2.0)
199207
signet (>= 0.16, < 2.a)
200208
highline (2.0.3)
201209
http-cookie (1.0.5)
202210
domain_name (~> 0.5)
203211
httpclient (2.8.3)
204-
i18n (1.12.0)
212+
i18n (1.14.1)
205213
concurrent-ruby (~> 1.0)
206214
jmespath (1.6.2)
207215
json (2.6.3)
208-
jwt (2.7.0)
209-
memoist (0.16.2)
216+
jwt (2.7.1)
210217
mini_magick (4.12.0)
211-
mini_mime (1.1.2)
212-
minitest (5.18.0)
218+
mini_mime (1.1.5)
219+
minitest (5.20.0)
213220
molinillo (0.8.0)
214221
multi_json (1.15.0)
215222
multipart-post (2.0.0)
223+
mutex_m (0.1.2)
216224
nanaimo (0.3.0)
217225
nap (1.1.0)
218226
naturally (2.2.1)
@@ -227,13 +235,13 @@ GEM
227235
trailblazer-option (>= 0.1.1, < 0.2.0)
228236
uber (< 0.2.0)
229237
retriable (3.1.2)
230-
rexml (3.2.5)
238+
rexml (3.2.6)
231239
rouge (2.0.7)
232240
ruby-macho (2.5.1)
233241
ruby2_keywords (0.0.5)
234242
rubyzip (2.3.2)
235243
security (0.1.3)
236-
signet (0.17.0)
244+
signet (0.18.0)
237245
addressable (~> 2.8)
238246
faraday (>= 0.17.5, < 3.a)
239247
jwt (>= 1.5, < 3.0)
@@ -260,7 +268,7 @@ GEM
260268
unicode-display_width (1.8.0)
261269
webrick (1.8.1)
262270
word_wrap (1.0.0)
263-
xcodeproj (1.22.0)
271+
xcodeproj (1.23.0)
264272
CFPropertyList (>= 2.3.3, < 4.0)
265273
atomos (~> 0.1.3)
266274
claide (>= 1.0.2, < 2.0)
@@ -271,14 +279,13 @@ GEM
271279
rouge (~> 2.0.7)
272280
xcpretty-travis-formatter (1.0.1)
273281
xcpretty (~> 0.2, >= 0.0.7)
274-
zeitwerk (2.6.7)
275282

276283
PLATFORMS
277-
x86_64-darwin-22
284+
x86_64-darwin-23
278285

279286
DEPENDENCIES
280-
cocoapods (= 1.11.3)
287+
cocoapods (= 1.13.0)
281288
fastlane (= 2.211.0)
282289

283290
BUNDLED WITH
284-
2.4.9
291+
2.4.21

‎README.md

+18-4
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,9 @@ iOS开发过程中,经常会遇到每次打开一个项目都需要手动搭
3333

3434
## 2. rbenv安装和shell设置
3535

36-
[rbenv 使用指南和常用命令](https://ruby-china.org/wiki/rbenv-guide)
36+
[rbenv](https://github.com/rbenv/rbenv)
37+
[rbenv使用指南](https://ruby-china.org/wiki/rbenv-guide)
38+
[安装新的 Ruby 版本需要 构建环境。请检查您的构建环境是否具有必要的工具和库 Ruby 3.1 及更高版本需要 OpenSSL 3](https://github.com/rbenv/ruby-build/wiki#suggested-build-environment)
3739
安装rbenv
3840

3941
```
@@ -46,14 +48,15 @@ shell 中设置 rbenv
4648
#rbenv
4749
export PATH="$HOME/.rbenv/bin:$PATH"
4850
eval "$(rbenv init -)"
51+
export RUBY_CONFIGURE_OPTS="--with-openssl-dir=$(brew --prefix openssl@3)"
4952
```
5053

5154
## 3. rbenv配置项目的ruby环境
5255

5356
```
5457
cd 到项目目录
55-
rbenv install 2.7.7
56-
rbenv local 2.7.7
58+
rbenv install 3.2.2
59+
rbenv local 3.2.2
5760
```
5861

5962
这里把该项目的ruby环境配置为2.7.7,rbenv会生成.ruby-version的文件, 这个文件通过git管理,这样就保证了所有人的该项目的ruby环境一致。
@@ -77,7 +80,7 @@ Gemfile添加三方工具CocoaPods 和 fastlane
7780
```
7881
source "https://rubygems.org"
7982
80-
gem "cocoapods", "1.11.3"
83+
gem "cocoapods", "1.30.0"
8184
gem "fastlane", "2.211.0"
8285
```
8386

@@ -93,6 +96,17 @@ gem "fastlane", "2.211.0"
9396
sudo gem install cocoapods
9497
```
9598

99+
安装报网络错误
100+
```
101+
ERROR: Could not find a valid gem 'cocoapods' (>= 0), here is why:
102+
Unable to download data from https://rubygems.org/ - Net::OpenTimeout: Net::OpenTimeout (https://rubygems.org/specs.4.8.gz)
103+
^CERROR: Interrupted
104+
```
105+
处理方法就是添加国内的源
106+
```
107+
gem sources --add https://gems.ruby-china.com/ --remove https://rubygems.org/
108+
```
109+
96110
generate_multiple_pod_projects 是CocoaPods 1.7.0 加入的新的属性,主要是将pod中的文件以project的形式加入到项目中。在使用post_install 中配置三方库的时候需要注意pod下面的文件是以project形式存在的。
97111

98112
```

0 commit comments

Comments
 (0)
Please sign in to comment.