Cocoapods 的安装与使用

官网:https://cocoapods.org/

建议科学上网,若采用国内镜像源,可能由于镜像源不同步 / 不完整 / 依赖关系冲突,导致报错

  • 1、通过 Gem 安装 Cocoapods

    详见Ruby & Gem 的安装与使用.md

  • 2、查看版本,命令如下

    1
    pod --version
  • 终端输出如下
    1
    1.15.2
  • 3、在目标项目中创建 Podfile 文件,命令如下

    1
    pod init
  • 4、添加准备集成的第三方库到 Podfile 文件,编辑如下

    【以 Alamofire 为例】
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    # Uncomment the next line to define a global platform for your project
    platform :ios, '12.0'

    target 'JQDemo' do
    # Comment the next line if you don't want to use dynamic frameworks
    use_frameworks!

    # Pods for JQDemo
    pod 'Alamofire'

    end
  • 5、安装第三方库,命令如下

    1
    pod install
  • 终端报错如下
    【网络问题 1,建议科学上网】
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    Analyzing dependencies
    Adding spec repo `trunk` with CDN `https://cdn.cocoapods.org/`
    Downloading dependencies
    Installing Alamofire (5.9.0)

    [!] Error installing Alamofire
    [!] /usr/bin/git clone https://github.com/Alamofire/Alamofire.git /var/folders/yl/9m95g2tj2wd2dwvnc4mzt61m0000gn/T/d20240322-47781-w2w99u --template= --single-branch --depth 1 --branch 5.9.0

    Cloning into '/var/folders/yl/9m95g2tj2wd2dwvnc4mzt61m0000gn/T/d20240322-47781-w2w99u'...
    fatal: unable to access 'https://github.com/Alamofire/Alamofire.git/': Failure when receiving data from the peer
    【网络问题 2,建议科学上网】
    1
    2
    3
    4
    5
    6
    7
    8
    9
    Analyzing dependencies
    Downloading dependencies
    Installing Alamofire (5.9.0)

    [!] Error installing Alamofire
    [!] /usr/bin/git clone https://github.com/Alamofire/Alamofire.git /var/folders/yl/9m95g2tj2wd2dwvnc4mzt61m0000gn/T/d20240322-47799-vs5a1b --template= --single-branch --depth 1 --branch 5.9.0

    Cloning into '/var/folders/yl/9m95g2tj2wd2dwvnc4mzt61m0000gn/T/d20240322-47799-vs5a1b'...
    fatal: unable to access 'https://github.com/Alamofire/Alamofire.git/': Failed to connect to github.com port 443 after 43636 ms: Couldn't connect to server
  • 终端输出如下

    1
    2
    3
    4
    5
    6
    7
    8
    Analyzing dependencies
    Downloading dependencies
    Installing Alamofire (5.9.0)
    Generating Pods project
    Integrating client project

    [!] Please close any current Xcode sessions and use `JQDemo.xcworkspace` for this project from now on.
    Pod installation complete! There is 1 dependency from the Podfile and 1 total pod installed.
  • 6、打开 .xcworkspace 文件,使用第三方库

  • 7、使用镜像【TODO:待补充】

仅供参考

Ruby & Gem 的安装与使用

官网:https://www.ruby-lang.org/zh_cn/

建议科学上网,若采用国内镜像源,可能由于镜像源不同步 / 不完整 / 依赖关系冲突,导致报错

  • 1、查看 Ruby & Gem 版本,命令如下

    1
    ruby -v
    1
    gem -v
  • 终端输出如下
    【macOS 默认安装了 Ruby & Gem】
    1
    ruby 2.6.10p210 (2022-04-12 revision 67958) [universal.x86_64-darwin23]
    1
    3.2.3
  • 2、通过 RVM 管理更新 Ruby

    详见RVM 的安装与使用.md

  • 3、更新 Gem,命令如下

    1
    gem update --system
  • 终端输出如下
    【包含更新后 - 更新前每次版本信息】详见文末
  • 4、查看升级后的 Ruby & Gem 版本

  • 终端输出如下
    1
    ruby 3.0.0p0 (2020-12-25 revision 95aff21468) [x86_64-darwin23]
    1
    3.5.6
  • 5、安装 Cocoapods,命令如下

    1
    gem install -n /usr/local/bin cocoapods
  • 终端输出如下
    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
    Fetching colored2-3.1.2.gem
    Fetching claide-1.1.0.gem
    Fetching atomos-0.1.3.gem
    Fetching xcodeproj-1.24.0.gem
    Fetching nanaimo-0.3.0.gem
    Fetching CFPropertyList-3.0.7.gem
    Fetching ruby-macho-2.5.1.gem
    Fetching nap-1.1.0.gem
    Fetching molinillo-0.8.0.gem
    Fetching gh_inspector-1.1.3.gem
    Fetching fourflusher-2.3.1.gem
    Fetching escape-0.0.4.gem
    Fetching cocoapods-try-1.2.0.gem
    Fetching netrc-0.11.0.gem
    Fetching cocoapods-trunk-1.6.0.gem
    Fetching cocoapods-search-1.0.1.gem
    Fetching cocoapods-plugins-1.0.0.gem
    Fetching cocoapods-downloader-2.1.gem
    Fetching cocoapods-deintegrate-1.0.5.gem
    Fetching ffi-1.16.3.gem
    Fetching ethon-0.16.0.gem
    Fetching typhoeus-1.4.1.gem
    Fetching public_suffix-4.0.7.gem
    Fetching fuzzy_match-2.0.4.gem
    Fetching concurrent-ruby-1.2.3.gem
    Fetching httpclient-2.8.3.gem
    Fetching algoliasearch-1.27.5.gem
    Fetching addressable-2.8.6.gem
    Fetching tzinfo-2.0.6.gem
    Fetching i18n-1.14.4.gem
    Fetching connection_pool-2.4.1.gem
    Fetching activesupport-7.1.3.2.gem
    Fetching cocoapods-1.15.2.gem
    Fetching cocoapods-core-1.15.2.gem
    Successfully installed nanaimo-0.3.0
    Successfully installed colored2-3.1.2
    Successfully installed claide-1.1.0
    Successfully installed CFPropertyList-3.0.7
    Successfully installed atomos-0.1.3
    Successfully installed xcodeproj-1.24.0
    Successfully installed ruby-macho-2.5.1
    Successfully installed nap-1.1.0
    Successfully installed molinillo-0.8.0
    Successfully installed gh_inspector-1.1.3
    Successfully installed fourflusher-2.3.1
    Successfully installed escape-0.0.4
    Successfully installed cocoapods-try-1.2.0
    Successfully installed netrc-0.11.0
    Successfully installed cocoapods-trunk-1.6.0
    Successfully installed cocoapods-search-1.0.1
    Successfully installed cocoapods-plugins-1.0.0
    Successfully installed cocoapods-downloader-2.1
    Successfully installed cocoapods-deintegrate-1.0.5
    Building native extensions. This could take a while...
    Successfully installed ffi-1.16.3
    Successfully installed ethon-0.16.0
    Successfully installed typhoeus-1.4.1
    Successfully installed public_suffix-4.0.7
    Successfully installed fuzzy_match-2.0.4
    Successfully installed concurrent-ruby-1.2.3
    Successfully installed httpclient-2.8.3
    A new major version is available for Algolia! Please now use the https://rubygems.org/gems/algolia gem to get the latest features.
    Successfully installed algoliasearch-1.27.5
    Successfully installed addressable-2.8.6
    Successfully installed tzinfo-2.0.6
    Successfully installed i18n-1.14.4
    Successfully installed connection_pool-2.4.1
    Successfully installed activesupport-7.1.3.2
    Successfully installed cocoapods-core-1.15.2
    Successfully installed cocoapods-1.15.2
    Parsing documentation for nanaimo-0.3.0
    Installing ri documentation for nanaimo-0.3.0
    Parsing documentation for colored2-3.1.2
    Installing ri documentation for colored2-3.1.2
    Parsing documentation for claide-1.1.0
    Installing ri documentation for claide-1.1.0
    Parsing documentation for CFPropertyList-3.0.7
    Installing ri documentation for CFPropertyList-3.0.7
    Parsing documentation for atomos-0.1.3
    Installing ri documentation for atomos-0.1.3
    Parsing documentation for xcodeproj-1.24.0
    Installing ri documentation for xcodeproj-1.24.0
    Parsing documentation for ruby-macho-2.5.1
    Installing ri documentation for ruby-macho-2.5.1
    Parsing documentation for nap-1.1.0
    Installing ri documentation for nap-1.1.0
    Parsing documentation for molinillo-0.8.0
    Installing ri documentation for molinillo-0.8.0
    Parsing documentation for gh_inspector-1.1.3
    Installing ri documentation for gh_inspector-1.1.3
    Parsing documentation for fourflusher-2.3.1
    Installing ri documentation for fourflusher-2.3.1
    Parsing documentation for escape-0.0.4
    Installing ri documentation for escape-0.0.4
    Parsing documentation for cocoapods-try-1.2.0
    Installing ri documentation for cocoapods-try-1.2.0
    Parsing documentation for netrc-0.11.0
    Installing ri documentation for netrc-0.11.0
    Parsing documentation for cocoapods-trunk-1.6.0
    Installing ri documentation for cocoapods-trunk-1.6.0
    Parsing documentation for cocoapods-search-1.0.1
    Installing ri documentation for cocoapods-search-1.0.1
    Parsing documentation for cocoapods-plugins-1.0.0
    Installing ri documentation for cocoapods-plugins-1.0.0
    Parsing documentation for cocoapods-downloader-2.1
    Installing ri documentation for cocoapods-downloader-2.1
    Parsing documentation for cocoapods-deintegrate-1.0.5
    Installing ri documentation for cocoapods-deintegrate-1.0.5
    Parsing documentation for ffi-1.16.3
    Installing ri documentation for ffi-1.16.3
    Parsing documentation for ethon-0.16.0
    Installing ri documentation for ethon-0.16.0
    Parsing documentation for typhoeus-1.4.1
    Installing ri documentation for typhoeus-1.4.1
    Parsing documentation for public_suffix-4.0.7
    Installing ri documentation for public_suffix-4.0.7
    Parsing documentation for fuzzy_match-2.0.4
    Installing ri documentation for fuzzy_match-2.0.4
    Parsing documentation for concurrent-ruby-1.2.3
    Installing ri documentation for concurrent-ruby-1.2.3
    Parsing documentation for httpclient-2.8.3
    Installing ri documentation for httpclient-2.8.3
    Parsing documentation for algoliasearch-1.27.5
    Installing ri documentation for algoliasearch-1.27.5
    Parsing documentation for addressable-2.8.6
    Installing ri documentation for addressable-2.8.6
    Parsing documentation for tzinfo-2.0.6
    Installing ri documentation for tzinfo-2.0.6
    Parsing documentation for i18n-1.14.4
    Installing ri documentation for i18n-1.14.4
    Parsing documentation for connection_pool-2.4.1
    Installing ri documentation for connection_pool-2.4.1
    Parsing documentation for activesupport-7.1.3.2
    Couldn't find file to include 'activesupport/README.rdoc' from lib/active_support.rb
    Installing ri documentation for activesupport-7.1.3.2
    Parsing documentation for cocoapods-core-1.15.2
    Installing ri documentation for cocoapods-core-1.15.2
    Parsing documentation for cocoapods-1.15.2
    Installing ri documentation for cocoapods-1.15.2
    Done installing documentation for nanaimo, colored2, claide, CFPropertyList, atomos, xcodeproj, ruby-macho, nap, molinillo, gh_inspector, fourflusher, escape, cocoapods-try, netrc, cocoapods-trunk, cocoapods-search, cocoapods-plugins, cocoapods-downloader, cocoapods-deintegrate, ffi, ethon, typhoeus, public_suffix, fuzzy_match, concurrent-ruby, httpclient, algoliasearch, addressable, tzinfo, i18n, connection_pool, activesupport, cocoapods-core, cocoapods after 16 seconds
    34 gems installed
  • 6、配置 Cocoapods 信息,命令如下

    1
    pod setup
  • 终端输出如下
    1
    Setup completed
  • 7、查看 Cocoapods 版本,命令如下

    1
    pod --version
  • 终端输出如下
    1
    1.15.2

仅供参考

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
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
Updating rubygems-update
Fetching rubygems-update-3.5.6.gem
Successfully installed rubygems-update-3.5.6
Parsing documentation for rubygems-update-3.5.6
Installing ri documentation for rubygems-update-3.5.6
Installing darkfish documentation for rubygems-update-3.5.6
Done installing documentation for rubygems-update after 2 seconds
Parsing documentation for rubygems-update-3.5.6
Done installing documentation for rubygems-update after 0 seconds
Installing RubyGems 3.5.6
Successfully built RubyGem
Name: bundler
Version: 2.5.6
File: bundler-2.5.6.gem
Bundler 2.5.6 installed
RubyGems 3.5.6 installed
Regenerating binstubs
Regenerating plugins
Parsing documentation for rubygems-3.5.6
Installing ri documentation for rubygems-3.5.6

# 3.5.6 / 2024-02-06

## Enhancements:

* Deep copy requirements in `Gem::Specification` and `Gem::Requirement`.
Pull request [#7439](https://github.com/rubygems/rubygems/pull/7439) by
flavorjones
* Change gem login message to clear up that username can be also used.
Pull request [#7422](https://github.com/rubygems/rubygems/pull/7422) by
VitaliySerov
* Add metadata for rubygems.org. Pull request
[#7435](https://github.com/rubygems/rubygems/pull/7435) by m-nakamura145
* Improve gem login scope selection. Pull request
[#7342](https://github.com/rubygems/rubygems/pull/7342) by williantenfen
* Vendor uri in RubyGems. Pull request
[#7386](https://github.com/rubygems/rubygems/pull/7386) by
deivid-rodriguez
* Installs bundler 2.5.6 as a default gem.

## Bug fixes:

* Skip to load commented out words. Pull request
[#7413](https://github.com/rubygems/rubygems/pull/7413) by hsbt
* Fix rake runtime dependency warning for rake based extension. Pull
request [#7395](https://github.com/rubygems/rubygems/pull/7395) by ntkme

# 3.5.5 / 2024-01-18

## Enhancements:

* Installs bundler 2.5.5 as a default gem.

## Bug fixes:

* Fix `require` activation conflicts when requiring default gems under
some situations. Pull request
[#7379](https://github.com/rubygems/rubygems/pull/7379) by
deivid-rodriguez
* Use cache_home instead of data_home in default_spec_cache_dir. Pull
request [#7331](https://github.com/rubygems/rubygems/pull/7331) by mrkn

## Documentation:

* Use squiggly heredocs in `Gem::Specification#description` documentation,
so it doesn't add leading whitespace. Pull request
[#7373](https://github.com/rubygems/rubygems/pull/7373) by bravehager

# 3.5.4 / 2024-01-04

## Enhancements:

* Always avoid "Updating rubygems-update" message. Pull request
[#7335](https://github.com/rubygems/rubygems/pull/7335) by
deivid-rodriguez
* Installs bundler 2.5.4 as a default gem.

## Bug fixes:

* Make `gem update --system` respect ruby version constraints. Pull
request [#7334](https://github.com/rubygems/rubygems/pull/7334) by
deivid-rodriguez

# 3.5.3 / 2023-12-22

## Enhancements:

* Installs bundler 2.5.3 as a default gem.

# 3.5.2 / 2023-12-21

## Enhancements:

* Support dynamic library loading with extension .so or .o. Pull request
[#7241](https://github.com/rubygems/rubygems/pull/7241) by hogelog
* Installs bundler 2.5.2 as a default gem.

## Performance:

* Replace `object_id` comparison with identity Hash. Pull request
[#7303](https://github.com/rubygems/rubygems/pull/7303) by amomchilov
* Use IO.copy_stream when reading, writing. Pull request
[#6958](https://github.com/rubygems/rubygems/pull/6958) by martinemde

# 3.5.1 / 2023-12-15

## Enhancements:

* Installs bundler 2.5.1 as a default gem.

# 3.5.0 / 2023-12-15

## Security:

* Replace `Marshal.load` with a fully-checked safe gemspec loader. Pull
request [#6896](https://github.com/rubygems/rubygems/pull/6896) by
segiddins

## Breaking changes:

* Drop ruby 2.6 and 2.7 support. Pull request
[#7116](https://github.com/rubygems/rubygems/pull/7116) by
deivid-rodriguez
* Release package no longer includes test files. Pull request
[#6781](https://github.com/rubygems/rubygems/pull/6781) by hsbt
* Hide `Gem::MockGemUi` from users. Pull request
[#6623](https://github.com/rubygems/rubygems/pull/6623) by hsbt
* Deprecated `Gem.datadir` has been removed. Pull request
[#6469](https://github.com/rubygems/rubygems/pull/6469) by hsbt

## Deprecations:

* Deprecate `Gem::Platform.match?`. Pull request
[#6783](https://github.com/rubygems/rubygems/pull/6783) by hsbt
* Deprecate `Gem::List`. Pull request
[#6311](https://github.com/rubygems/rubygems/pull/6311) by segiddins

## Features:

* The `generate_index` command can now generate compact index files and
lives as an external `rubygems-generate_index` gem. Pull request
[#7085](https://github.com/rubygems/rubygems/pull/7085) by segiddins
* Make `gem install` fallback to user installation directory if default
gem home is not writable. Pull request
[#5327](https://github.com/rubygems/rubygems/pull/5327) by duckinator
* Leverage ruby feature to warn when requiring default gems from stdlib
that will be turned into bundled gems in the future. Pull request
[#6840](https://github.com/rubygems/rubygems/pull/6840) by hsbt

## Performance:

* Use match? when regexp match data is unused. Pull request
[#7263](https://github.com/rubygems/rubygems/pull/7263) by segiddins
* Fewer allocations in gem installation. Pull request
[#6975](https://github.com/rubygems/rubygems/pull/6975) by segiddins
* Optimize allocations in `Gem::Version`. Pull request
[#6970](https://github.com/rubygems/rubygems/pull/6970) by segiddins

## Enhancements:

* Warn for duplicate meta data links when building gems. Pull request
[#7213](https://github.com/rubygems/rubygems/pull/7213) by etherbob
* Vendor `net-http`, `net-protocol`, `resolv`, and `timeout` to reduce
conflicts between Gemfile gems and internal dependencies. Pull request
[#6793](https://github.com/rubygems/rubygems/pull/6793) by
deivid-rodriguez
* Remove non-transparent requirement added to prerelease gems. Pull
request [#7226](https://github.com/rubygems/rubygems/pull/7226) by
deivid-rodriguez
* Stream output from ext builds when --verbose. Pull request
[#7240](https://github.com/rubygems/rubygems/pull/7240) by osyoyu
* Add missing services to CI detection and make it consistent between
RubyGems and Bundler. Pull request
[#7205](https://github.com/rubygems/rubygems/pull/7205) by nevinera
* Update generate licenses template to not freeze regexps. Pull request
[#7154](https://github.com/rubygems/rubygems/pull/7154) by
github-actions[bot]
* Don't check `LIBRUBY_RELATIVE` in truffleruby to signal a bash prelude
in rubygems binstubs. Pull request
[#7156](https://github.com/rubygems/rubygems/pull/7156) by
deivid-rodriguez
* Update SPDX list and warn on deprecated identifiers. Pull request
[#6926](https://github.com/rubygems/rubygems/pull/6926) by simi
* Simplify extended `require` to potentially fix some deadlocks. Pull
request [#6827](https://github.com/rubygems/rubygems/pull/6827) by nobu
* Small refactors for `Gem::Resolver`. Pull request
[#6766](https://github.com/rubygems/rubygems/pull/6766) by hsbt
* Use double-quotes instead of single-quotes consistently in warnings.
Pull request [#6550](https://github.com/rubygems/rubygems/pull/6550) by
hsbt
* Add debug message for `nil` version gemspec. Pull request
[#6436](https://github.com/rubygems/rubygems/pull/6436) by hsbt
* Installs bundler 2.5.0 as a default gem.

## Bug fixes:

* Fix installing from source with same default bundler version already
installed. Pull request
[#7244](https://github.com/rubygems/rubygems/pull/7244) by
deivid-rodriguez

## Documentation:

* Improve comment explaining the necessity of `write_default_spec` method.
Pull request [#6563](https://github.com/rubygems/rubygems/pull/6563) by
voxik

# 3.4.22 / 2023-11-09

## Enhancements:

* Update SPDX license list as of 2023-10-05. Pull request
[#7040](https://github.com/rubygems/rubygems/pull/7040) by
github-actions[bot]
* Remove unnecessary rescue. Pull request
[#7109](https://github.com/rubygems/rubygems/pull/7109) by
deivid-rodriguez
* Installs bundler 2.4.22 as a default gem.

## Bug fixes:

* Handle empty array at built-in YAML serializer. Pull request
[#7099](https://github.com/rubygems/rubygems/pull/7099) by hsbt
* Ignore non-tar format `.gem` files during search. Pull request
[#7095](https://github.com/rubygems/rubygems/pull/7095) by dearblue
* Allow explicitly uninstalling multiple versions of same gem. Pull
request [#7063](https://github.com/rubygems/rubygems/pull/7063) by
kstevens715

## Performance:

* Avoid regexp match on every call to `Gem::Platform.local`. Pull request
[#7104](https://github.com/rubygems/rubygems/pull/7104) by segiddins

## Documentation:

* Get `Gem::Specification#extensions_dir` documented. Pull request
[#6218](https://github.com/rubygems/rubygems/pull/6218) by
deivid-rodriguez

# 3.4.21 / 2023-10-17

## Enhancements:

* Abort `setup.rb` if Ruby is too old. Pull request
[#7011](https://github.com/rubygems/rubygems/pull/7011) by
deivid-rodriguez
* Remove usage of Dir.chdir that only execute a subprocess. Pull request
[#6930](https://github.com/rubygems/rubygems/pull/6930) by segiddins
* Freeze more strings in generated gemspecs. Pull request
[#6974](https://github.com/rubygems/rubygems/pull/6974) by segiddins
* Use pure-ruby YAML parser for loading configuration at RubyGems. Pull
request [#6615](https://github.com/rubygems/rubygems/pull/6615) by hsbt
* Installs bundler 2.4.21 as a default gem.

## Documentation:

* Update suggested variable for bindir. Pull request
[#7028](https://github.com/rubygems/rubygems/pull/7028) by hsbt
* Fix invalid links in documentation. Pull request
[#7008](https://github.com/rubygems/rubygems/pull/7008) by simi

# 3.4.20 / 2023-09-27

## Enhancements:

* Raise `Gem::Package::FormatError` when gem encounters corrupt EOF.
Pull request [#6882](https://github.com/rubygems/rubygems/pull/6882)
by martinemde
* Allow skipping empty license `gem build` warning by setting license to
`nil`. Pull request
[#6879](https://github.com/rubygems/rubygems/pull/6879) by jhong97
* Update SPDX license list as of 2023-06-18. Pull request
[#6891](https://github.com/rubygems/rubygems/pull/6891) by
github-actions[bot]
* Update SPDX license list as of 2023-04-28. Pull request
[#6642](https://github.com/rubygems/rubygems/pull/6642) by segiddins
* Update SPDX license list as of 2023-01-26. Pull request
[#6310](https://github.com/rubygems/rubygems/pull/6310) by segiddins
* Installs bundler 2.4.20 as a default gem.

## Bug fixes:

* Fixed false positive SymlinkError in symbolic link directory. Pull
request [#6947](https://github.com/rubygems/rubygems/pull/6947) by
negi0109
* Ensure that loading multiple gemspecs with legacy YAML class references
does not warn. Pull request
[#6889](https://github.com/rubygems/rubygems/pull/6889) by segiddins
* Fix NoMethodError when choosing a too big number from `gem uni` list.
Pull request [#6901](https://github.com/rubygems/rubygems/pull/6901) by
amatsuda

## Performance:

* Reduce allocations for stub specifications. Pull request
[#6972](https://github.com/rubygems/rubygems/pull/6972) by segiddins

# 3.4.19 / 2023-08-17

## Enhancements:

* Installs bundler 2.4.19 as a default gem.

## Performance:

* Speedup building docs when updating rubygems. Pull request
[#6864](https://github.com/rubygems/rubygems/pull/6864) by
deivid-rodriguez

# 3.4.18 / 2023-08-02

## Enhancements:

* Add poller to fetch WebAuthn OTP. Pull request
[#6774](https://github.com/rubygems/rubygems/pull/6774) by jenshenny
* Remove side effects when unmarshaling old `Gem::Specification`. Pull
request [#6825](https://github.com/rubygems/rubygems/pull/6825) by nobu
* Ship rubygems executables in `exe` folder. Pull request
[#6704](https://github.com/rubygems/rubygems/pull/6704) by hsbt
* Installs bundler 2.4.18 as a default gem.

# 3.4.17 / 2023-07-14

## Enhancements:

* Installs bundler 2.4.17 as a default gem.

## Performance:

* Avoid unnecessary work for private local gem installation. Pull request
[#6810](https://github.com/rubygems/rubygems/pull/6810) by
deivid-rodriguez

# 3.4.16 / 2023-07-10

## Enhancements:

* Installs bundler 2.4.16 as a default gem.

# 3.4.15 / 2023-06-29

## Enhancements:

* Installs bundler 2.4.15 as a default gem.

## Bug fixes:

* Autoload shellwords when it's needed. Pull request
[#6734](https://github.com/rubygems/rubygems/pull/6734) by ioquatix

## Documentation:

* Update command to test local gem command changes. Pull request
[#6761](https://github.com/rubygems/rubygems/pull/6761) by jenshenny

# 3.4.14 / 2023-06-12

## Enhancements:

* Load plugin immediately. Pull request
[#6673](https://github.com/rubygems/rubygems/pull/6673) by kou
* Installs bundler 2.4.14 as a default gem.

## Documentation:

* Clarify what the `rubygems-update` gem is for, and link to source code
and guides. Pull request
[#6710](https://github.com/rubygems/rubygems/pull/6710) by davetron5000

# 3.4.13 / 2023-05-09

## Enhancements:

* Installs bundler 2.4.13 as a default gem.

# 3.4.12 / 2023-04-11

## Enhancements:

* [Experimental] Add WebAuthn Support to the CLI. Pull request
[#6560](https://github.com/rubygems/rubygems/pull/6560) by jenshenny
* Installs bundler 2.4.12 as a default gem.

# 3.4.11 / 2023-04-10

## Enhancements:

* Installs bundler 2.4.11 as a default gem.

# 3.4.10 / 2023-03-27

## Enhancements:

* Installs bundler 2.4.10 as a default gem.

# 3.4.9 / 2023-03-20

## Enhancements:

* Improve `TarHeader#calculate_checksum` speed and readability. Pull
request [#6476](https://github.com/rubygems/rubygems/pull/6476) by
Maumagnaguagno
* Added only missing extensions option into pristine command. Pull request
[#6446](https://github.com/rubygems/rubygems/pull/6446) by hsbt
* Installs bundler 2.4.9 as a default gem.

## Bug fixes:

* Fix `$LOAD_PATH` in rake and ext_conf builder. Pull request
[#6490](https://github.com/rubygems/rubygems/pull/6490) by ntkme
* Fix `gem uninstall` with `--install-dir`. Pull request
[#6481](https://github.com/rubygems/rubygems/pull/6481) by
deivid-rodriguez

## Documentation:

* Document our current release policy. Pull request
[#6450](https://github.com/rubygems/rubygems/pull/6450) by
deivid-rodriguez

# 3.4.8 / 2023-03-08

## Enhancements:

* Add TarReader::Entry#seek to seek within the tar file entry. Pull
request [#6390](https://github.com/rubygems/rubygems/pull/6390) by
martinemde
* Avoid calling String#dup in Gem::Version#marshal_dump. Pull request
[#6438](https://github.com/rubygems/rubygems/pull/6438) by segiddins
* Remove hardcoded "master" branch references. Pull request
[#6425](https://github.com/rubygems/rubygems/pull/6425) by
deivid-rodriguez
* [Experimental] Add `gem exec` command to run executables from gems that
may or may not be installed. Pull request
[#6309](https://github.com/rubygems/rubygems/pull/6309) by segiddins
* Installs bundler 2.4.8 as a default gem.

## Bug fixes:

* Fix installation error of same version of default gems with local
installation. Pull request
[#6430](https://github.com/rubygems/rubygems/pull/6430) by hsbt
* Use proper memoized var name for Gem.state_home. Pull request
[#6420](https://github.com/rubygems/rubygems/pull/6420) by simi

## Documentation:

* Switch supporting explanations to all Ruby Central. Pull request
[#6419](https://github.com/rubygems/rubygems/pull/6419) by indirect
* Update the link to OpenSource.org. Pull request
[#6392](https://github.com/rubygems/rubygems/pull/6392) by nobu

# 3.4.7 / 2023-02-15

## Enhancements:

* Warn on self referencing gemspec dependency. Pull request
[#6335](https://github.com/rubygems/rubygems/pull/6335) by simi
* Installs bundler 2.4.7 as a default gem.

## Bug fixes:

* Fix inconsistent behavior of zero byte files in archive. Pull request
[#6329](https://github.com/rubygems/rubygems/pull/6329) by martinemde

# 3.4.6 / 2023-01-31

## Enhancements:

* Allow `require` decorations be disabled. Pull request
[#6319](https://github.com/rubygems/rubygems/pull/6319) by
deivid-rodriguez
* Installs bundler 2.4.6 as a default gem.

## Bug fixes:

* Include directory in CargoBuilder install path. Pull request
[#6298](https://github.com/rubygems/rubygems/pull/6298) by matsadler

## Documentation:

* Include links to pull requests in changelog. Pull request
[#6316](https://github.com/rubygems/rubygems/pull/6316) by
deivid-rodriguez

# 3.4.5 / 2023-01-21

## Enhancements:

* Installs bundler 2.4.5 as a default gem.

# 3.4.4 / 2023-01-16

## Enhancements:

* Installs bundler 2.4.4 as a default gem.

## Documentation:

* Improve documentation about `Kernel` monkeypatches. Pull request [#6217](https://github.com/rubygems/rubygems/pull/6217)
by nobu

# 3.4.3 / 2023-01-06

## Enhancements:

* Installs bundler 2.4.3 as a default gem.

## Documentation:

* Fix several typos. Pull request [#6224](https://github.com/rubygems/rubygems/pull/6224) by jdufresne

# 3.4.2 / 2023-01-01

## Enhancements:

* Add global flag (`-C`) to change execution directory. Pull request [#6180](https://github.com/rubygems/rubygems/pull/6180)
by gustavothecoder
* Installs bundler 2.4.2 as a default gem.

# 3.4.1 / 2022-12-24

## Enhancements:

* Installs bundler 2.4.1 as a default gem.

# 3.4.0 / 2022-12-24

## Breaking changes:

* Drop support for Ruby 2.3, 2.4, 2.5 and RubyGems 2.5, 2.6, 2.7. Pull
request [#6107](https://github.com/rubygems/rubygems/pull/6107) by deivid-rodriguez
* Remove support for deprecated OS. Pull request [#6041](https://github.com/rubygems/rubygems/pull/6041) by peterzhu2118

## Features:

* Add 'call for update' to RubyGems install command. Pull request [#5922](https://github.com/rubygems/rubygems/pull/5922) by
simi

## Enhancements:

* Add `mswin` support for cargo builder. Pull request [#6167](https://github.com/rubygems/rubygems/pull/6167) by ianks
* Validate Cargo.lock is present for Rust based extensions. Pull request
[#6151](https://github.com/rubygems/rubygems/pull/6151) by simi
* Clean built artifacts after building extensions. Pull request [#6133](https://github.com/rubygems/rubygems/pull/6133) by
deivid-rodriguez
* Installs bundler 2.4.0 as a default gem.

## Bug fixes:

* Fix crash due to `BundlerVersionFinder` not defined. Pull request [#6152](https://github.com/rubygems/rubygems/pull/6152)
by deivid-rodriguez
* Don't leave corrupted partial package download around when running out
of disk space. Pull request [#5681](https://github.com/rubygems/rubygems/pull/5681) by duckinator

# 3.3.26 / 2022-11-16

## Enhancements:

* Upgrade rb-sys to 0.9.37. Pull request [#6047](https://github.com/rubygems/rubygems/pull/6047) by ianks
* Installs bundler 2.3.26 as a default gem.

# 3.3.25 / 2022-11-02

## Enhancements:

* Github source should default to secure protocol. Pull request [#6026](https://github.com/rubygems/rubygems/pull/6026) by
jasonkarns
* Allow upcoming JRuby to pass keywords to Kernel#warn. Pull request [#6002](https://github.com/rubygems/rubygems/pull/6002)
by enebo
* Installs bundler 2.3.25 as a default gem.

# 3.3.24 / 2022-10-17

## Enhancements:

* Installs bundler 2.3.24 as a default gem.

# 3.3.23 / 2022-10-05

## Enhancements:

* Add better error handling for permanent redirect responses. Pull request
[#5931](https://github.com/rubygems/rubygems/pull/5931) by jenshenny
* Installs bundler 2.3.23 as a default gem.

## Bug fixes:

* Fix generic arm platform matching against runtime arm platforms with
eabi modifiers. Pull request [#5957](https://github.com/rubygems/rubygems/pull/5957) by deivid-rodriguez
* Fix `Gem::Platform.match` not handling String argument properly. Pull
request [#5939](https://github.com/rubygems/rubygems/pull/5939) by flavorjones
* Fix resolution on non-musl platforms. Pull request [#5915](https://github.com/rubygems/rubygems/pull/5915) by
deivid-rodriguez
* Mask the file mode when extracting files. Pull request [#5906](https://github.com/rubygems/rubygems/pull/5906) by
kddnewton

# 3.3.22 / 2022-09-07

## Enhancements:

* Support non gnu libc arm-linux-eabi platforms. Pull request [#5889](https://github.com/rubygems/rubygems/pull/5889) by
ntkme
* Installs bundler 2.3.22 as a default gem.

## Bug fixes:

* Fix `gem info` with explicit `--version`. Pull request [#5884](https://github.com/rubygems/rubygems/pull/5884) by
tonyaraujop

# 3.3.21 / 2022-08-24

## Enhancements:

* Support non gnu libc linux platforms. Pull request [#5852](https://github.com/rubygems/rubygems/pull/5852) by
deivid-rodriguez
* Installs bundler 2.3.21 as a default gem.

# 3.3.20 / 2022-08-10

## Enhancements:

* Include backtrace with crashes by default. Pull request [#5811](https://github.com/rubygems/rubygems/pull/5811) by
deivid-rodriguez
* Don't create broken symlinks when a gem includes them, but print a
warning instead. Pull request [#5801](https://github.com/rubygems/rubygems/pull/5801) by deivid-rodriguez
* Warn (rather than crash) when setting `nil` specification versions. Pull
request [#5794](https://github.com/rubygems/rubygems/pull/5794) by deivid-rodriguez
* Installs bundler 2.3.20 as a default gem.

## Bug fixes:

* Always consider installed specs for resolution, even if prereleases.
Pull request [#5821](https://github.com/rubygems/rubygems/pull/5821) by deivid-rodriguez
* Fix `gem install` with `--platform` flag not matching simulated platform
correctly. Pull request [#5820](https://github.com/rubygems/rubygems/pull/5820) by deivid-rodriguez
* Fix platform matching for index specs. Pull request [#5795](https://github.com/rubygems/rubygems/pull/5795) by Ilushkanama

# 3.3.19 / 2022-07-27

## Enhancements:

* Display mfa warnings on `gem signin`. Pull request [#5590](https://github.com/rubygems/rubygems/pull/5590) by aellispierce
* Require fileutils more lazily when installing gems. Pull request [#5738](https://github.com/rubygems/rubygems/pull/5738)
by deivid-rodriguez
* Fix upgrading RubyGems with a customized `Gem.default_dir`. Pull request
[#5728](https://github.com/rubygems/rubygems/pull/5728) by deivid-rodriguez
* Stop using `/dev/null` for silent ui for WASI platform. Pull request
[#5703](https://github.com/rubygems/rubygems/pull/5703) by kateinoigakukun
* Unify loading `Gem::Requirement`. Pull request [#5596](https://github.com/rubygems/rubygems/pull/5596) by deivid-rodriguez
* Installs bundler 2.3.19 as a default gem.

## Bug fixes:

* Fix `ruby setup.rb` with `--destdir` writing outside of `--destdir`.
Pull request [#5737](https://github.com/rubygems/rubygems/pull/5737) by deivid-rodriguez

## Documentation:

* Fix wrong information about default RubyGems source. Pull request [#5723](https://github.com/rubygems/rubygems/pull/5723)
by tnir

# 3.3.18 / 2022-07-14

## Enhancements:

* Make platform `universal-mingw32` match "x64-mingw-ucrt". Pull request
[#5655](https://github.com/rubygems/rubygems/pull/5655) by johnnyshields
* Add more descriptive messages when `gem update` fails to update some
gems. Pull request [#5676](https://github.com/rubygems/rubygems/pull/5676) by brianleshopify
* Installs bundler 2.3.18 as a default gem.

## Bug fixes:

* Make sure RubyGems prints no warnings when loading plugins. Pull request
[#5607](https://github.com/rubygems/rubygems/pull/5607) by deivid-rodriguez

# 3.3.17 / 2022-06-29

## Enhancements:

* Document `gem env` argument aliases and add `gem env user_gemhome` and
`gem env user_gemdir`. Pull request [#5644](https://github.com/rubygems/rubygems/pull/5644) by deivid-rodriguez
* Improve error message when `operating_system.rb` fails to load. Pull
request [#5658](https://github.com/rubygems/rubygems/pull/5658) by deivid-rodriguez
* Clean up temporary directory after `generate_index --update`. Pull
request [#5653](https://github.com/rubygems/rubygems/pull/5653) by graywolf-at-work
* Simplify extension builder. Pull request [#5626](https://github.com/rubygems/rubygems/pull/5626) by deivid-rodriguez
* Installs bundler 2.3.17 as a default gem.

## Documentation:

* Modify RubyGems issue template to be like the one for Bundler. Pull
request [#5643](https://github.com/rubygems/rubygems/pull/5643) by deivid-rodriguez

# 3.3.16 / 2022-06-15

## Enhancements:

* Auto-fix and warn gem packages including a gemspec with `require_paths`
as an array of arrays. Pull request [#5615](https://github.com/rubygems/rubygems/pull/5615) by deivid-rodriguez
* Misc cargo builder improvements. Pull request [#5459](https://github.com/rubygems/rubygems/pull/5459) by ianks
* Installs bundler 2.3.16 as a default gem.

## Bug fixes:

* Fix incorrect password redaction when there's an error in `gem source
-a`. Pull request [#5623](https://github.com/rubygems/rubygems/pull/5623) by deivid-rodriguez
* Fix another regression when loading old marshaled specs. Pull request
[#5610](https://github.com/rubygems/rubygems/pull/5610) by deivid-rodriguez

# 3.3.15 / 2022-06-01

## Enhancements:

* Support the change of did_you_mean about `Exception#detailed_message`.
Pull request [#5560](https://github.com/rubygems/rubygems/pull/5560) by mame
* Installs bundler 2.3.15 as a default gem.

## Bug fixes:

* Fix loading old marshaled specs including `YAML::PrivateType` constant.
Pull request [#5415](https://github.com/rubygems/rubygems/pull/5415) by deivid-rodriguez
* Fix rubygems update when non default `--install-dir` is configured. Pull
request [#5566](https://github.com/rubygems/rubygems/pull/5566) by deivid-rodriguez

# 3.3.14 / 2022-05-18

## Enhancements:

* Installs bundler 2.3.14 as a default gem.

# 3.3.13 / 2022-05-04

## Enhancements:

* Installs bundler 2.3.13 as a default gem.

## Bug fixes:

* Fix regression when resolving ruby constraints. Pull request [#5486](https://github.com/rubygems/rubygems/pull/5486) by
deivid-rodriguez

## Documentation:

* Clarify description of owner-flags. Pull request [#5497](https://github.com/rubygems/rubygems/pull/5497) by kronn

# 3.3.12 / 2022-04-20

## Enhancements:

* Less error swallowing when installing gems. Pull request [#5475](https://github.com/rubygems/rubygems/pull/5475) by
deivid-rodriguez
* Stop considering `RUBY_PATCHLEVEL` for resolution. Pull request [#5472](https://github.com/rubygems/rubygems/pull/5472) by
deivid-rodriguez
* Bump vendored optparse to latest master. Pull request [#5466](https://github.com/rubygems/rubygems/pull/5466) by
deivid-rodriguez
* Installs bundler 2.3.12 as a default gem.

## Documentation:

* Fix formatting in docs. Pull request [#5470](https://github.com/rubygems/rubygems/pull/5470) by peterzhu2118
* Fix a typo. Pull request [#5401](https://github.com/rubygems/rubygems/pull/5401) by znz

# 3.3.11 / 2022-04-07

## Enhancements:

* Enable mfa on specific keys during gem signin. Pull request [#5305](https://github.com/rubygems/rubygems/pull/5305) by
aellispierce
* Prefer `__dir__` to `__FILE__`. Pull request [#5444](https://github.com/rubygems/rubygems/pull/5444) by deivid-rodriguez
* Add cargo builder for rust extensions. Pull request [#5175](https://github.com/rubygems/rubygems/pull/5175) by ianks
* Installs bundler 2.3.11 as a default gem.

## Documentation:

* Improve RDoc setup. Pull request [#5398](https://github.com/rubygems/rubygems/pull/5398) by deivid-rodriguez

# 3.3.10 / 2022-03-23

## Enhancements:

* Installs bundler 2.3.10 as a default gem.

## Documentation:

* Enable `Gem::Package` example in RDoc documentation. Pull request [#5399](https://github.com/rubygems/rubygems/pull/5399)
by nobu
* Unhide RDoc documentation from top level `Gem` module. Pull request
[#5396](https://github.com/rubygems/rubygems/pull/5396) by nobu

# 3.3.9 / 2022-03-09

## Enhancements:

* Installs bundler 2.3.9 as a default gem.

# 3.3.8 / 2022-02-23

## Enhancements:

* Installs bundler 2.3.8 as a default gem.

# 3.3.7 / 2022-02-09

## Enhancements:

* Installs bundler 2.3.7 as a default gem.

## Documentation:

* Fix missing rdoc for `Gem::Version`. Pull request [#5299](https://github.com/rubygems/rubygems/pull/5299) by nevans

# 3.3.6 / 2022-01-26

## Enhancements:

* Forbid downgrading past the originally shipped version on Ruby 3.1. Pull
request [#5301](https://github.com/rubygems/rubygems/pull/5301) by deivid-rodriguez
* Support `--enable-load-relative` inside binstubs. Pull request [#2929](https://github.com/rubygems/rubygems/pull/2929) by
deivid-rodriguez
* Let `Version#<=>` accept a String. Pull request [#5275](https://github.com/rubygems/rubygems/pull/5275) by amatsuda
* Installs bundler 2.3.6 as a default gem.

## Bug fixes:

* Avoid `flock` on non Windows systems, since it causing issues on NFS
file systems. Pull request [#5278](https://github.com/rubygems/rubygems/pull/5278) by deivid-rodriguez
* Fix `gem update --system` for already installed version of
`rubygems-update`. Pull request [#5285](https://github.com/rubygems/rubygems/pull/5285) by loadkpi

# 3.3.5 / 2022-01-12

## Enhancements:

* Don't activate `yaml` gem from RubyGems. Pull request [#5266](https://github.com/rubygems/rubygems/pull/5266) by
deivid-rodriguez
* Let `gem fetch` understand `<gem>:<version>` syntax and
`--[no-]suggestions` flag. Pull request [#5242](https://github.com/rubygems/rubygems/pull/5242) by ximenasandoval
* Installs bundler 2.3.5 as a default gem.

## Bug fixes:

* Fix `gem install <non-existent-gem> --force` crash. Pull request [#5262](https://github.com/rubygems/rubygems/pull/5262)
by deivid-rodriguez
* Fix longstanding `gem install` failure on JRuby. Pull request [#5228](https://github.com/rubygems/rubygems/pull/5228) by
deivid-rodriguez

## Documentation:

* Markup `Gem::Specification` documentation with RDoc notations. Pull
request [#5268](https://github.com/rubygems/rubygems/pull/5268) by nobu

# 3.3.4 / 2021-12-29

## Enhancements:

* Don't redownload `rubygems-update` package if already there. Pull
request [#5230](https://github.com/rubygems/rubygems/pull/5230) by deivid-rodriguez
* Installs bundler 2.3.4 as a default gem.

## Bug fixes:

* Fix `gem update --system` crashing when latest version not supported.
Pull request [#5191](https://github.com/rubygems/rubygems/pull/5191) by deivid-rodriguez

## Performance:

* Make SpecificationPolicy autoload constant. Pull request [#5222](https://github.com/rubygems/rubygems/pull/5222) by pocke

# 3.3.3 / 2021-12-24

## Enhancements:

* Installs bundler 2.3.3 as a default gem.

## Bug fixes:

* Fix gem installation failing in Solaris due to bad `IO#flock` usage.
Pull request [#5216](https://github.com/rubygems/rubygems/pull/5216) by mame

# 3.3.2 / 2021-12-23

## Enhancements:

* Fix deprecations when activating DidYouMean for misspelled command
suggestions. Pull request [#5211](https://github.com/rubygems/rubygems/pull/5211) by yuki24
* Installs bundler 2.3.2 as a default gem.

## Bug fixes:

* Fix gemspec truncation. Pull request [#5208](https://github.com/rubygems/rubygems/pull/5208) by deivid-rodriguez

# 3.3.1 / 2021-12-22

## Enhancements:

* Fix compatibility with OpenSSL 3.0. Pull request [#5196](https://github.com/rubygems/rubygems/pull/5196) by rhenium
* Remove hard errors when matching major bundler not found. Pull request
[#5181](https://github.com/rubygems/rubygems/pull/5181) by deivid-rodriguez
* Installs bundler 2.3.1 as a default gem.

# 3.3.0 / 2021-12-21

## Breaking changes:

* Removed deprecated `gem server` command. Pull request [#5034](https://github.com/rubygems/rubygems/pull/5034) by hsbt
* Remove macOS specific gem layout. Pull request [#4833](https://github.com/rubygems/rubygems/pull/4833) by deivid-rodriguez
* Default `gem update` documentation format is now only `ri`. Pull request
[#3888](https://github.com/rubygems/rubygems/pull/3888) by hsbt

## Features:

* Give command misspelled suggestions via `did_you_mean` gem. Pull request
[#3904](https://github.com/rubygems/rubygems/pull/3904) by hsbt

## Performance:

* Avoid some unnecessary stat calls. Pull request [#3887](https://github.com/rubygems/rubygems/pull/3887) by kares
* Improve spell checking suggestion performance by
vendoring`DidYouMean::Levenshtein.distance` from `did_you_mean-1.4.0`.
Pull request [#3856](https://github.com/rubygems/rubygems/pull/3856) by austinpray

## Enhancements:

* Set `BUNDLER_VERSION` when `bundle _<version>_` is passed. Pull request
[#5180](https://github.com/rubygems/rubygems/pull/5180) by deivid-rodriguez
* Don't require `rdoc` for `gem uninstall`. Pull request [#4691](https://github.com/rubygems/rubygems/pull/4691) by ndren
* More focused rescue on extension builder exception to get more
information on errors. Pull request [#4189](https://github.com/rubygems/rubygems/pull/4189) by deivid-rodriguez
* Installs bundler 2.3.0 as a default gem.

## Bug fixes:

* Fix encoding mismatch issues when writing gem packages. Pull request
[#5162](https://github.com/rubygems/rubygems/pull/5162) by deivid-rodriguez
* Fix broken brew formula due to loading `operating_system.rb`
customizations too late. Pull request [#5154](https://github.com/rubygems/rubygems/pull/5154) by deivid-rodriguez
* Properly fetch `Gem#latest_spec_for` with multiple sources. Pull request
[#2764](https://github.com/rubygems/rubygems/pull/2764) by kevlogan90
* Fix upgrade crashing when multiple versions of `fileutils` installed.
Pull request [#5140](https://github.com/rubygems/rubygems/pull/5140) by deivid-rodriguez

# 3.2.33 / 2021-12-07

## Deprecations:

* Deprecate typo name. Pull request [#5109](https://github.com/rubygems/rubygems/pull/5109) by nobu

## Enhancements:

* Add login & logout alias for the signin & signout commands. Pull request
[#5133](https://github.com/rubygems/rubygems/pull/5133) by colby-swandale
* Fix race conditions when reading & writing gemspecs concurrently. Pull
request [#4408](https://github.com/rubygems/rubygems/pull/4408) by deivid-rodriguez
* Installs bundler 2.2.33 as a default gem.

## Bug fixes:

* Fix `ruby setup.rb` trying to write outside of `--destdir`. Pull request
[#5053](https://github.com/rubygems/rubygems/pull/5053) by deivid-rodriguez

## Documentation:

* Move required_ruby_version gemspec attribute to recommended section.
Pull request [#5130](https://github.com/rubygems/rubygems/pull/5130) by simi
* Ignore to generate the documentation from vendored libraries. Pull
request [#5118](https://github.com/rubygems/rubygems/pull/5118) by hsbt

# 3.2.32 / 2021-11-23

## Enhancements:

* Refactor installer thread safety protections. Pull request [#5050](https://github.com/rubygems/rubygems/pull/5050) by
deivid-rodriguez
* Allow gem activation from `operating_system.rb`. Pull request [#5044](https://github.com/rubygems/rubygems/pull/5044) by
deivid-rodriguez
* Installs bundler 2.2.32 as a default gem.

# 3.2.31 / 2021-11-08

## Enhancements:

* Don't pass empty `DESTDIR` to `nmake` since it works differently from
standard `make`. Pull request [#5057](https://github.com/rubygems/rubygems/pull/5057) by hsbt
* Fix `gem install` vs `gem fetch` inconsistency. Pull request [#5037](https://github.com/rubygems/rubygems/pull/5037) by
deivid-rodriguez
* Lazily load and vendor `optparse`. Pull request [#4881](https://github.com/rubygems/rubygems/pull/4881) by
deivid-rodriguez
* Use a vendored copy of `tsort` internally. Pull request [#5027](https://github.com/rubygems/rubygems/pull/5027) by
deivid-rodriguez
* Install bundler 2.2.31 as a default gem.

## Bug fixes:

* Fix `ruby setup.rb` when `--prefix` is passed. Pull request [#5051](https://github.com/rubygems/rubygems/pull/5051) by
deivid-rodriguez
* Don't apply `--destdir` twice when running `setup.rb`. Pull request
[#2768](https://github.com/rubygems/rubygems/pull/2768) by alyssais

# 3.2.30 / 2021-10-26

## Enhancements:

* Add support to build and sign certificates with multiple key algorithms.
Pull request [#4991](https://github.com/rubygems/rubygems/pull/4991) by doodzik
* Avoid loading the `digest` gem unnecessarily. Pull request [#4979](https://github.com/rubygems/rubygems/pull/4979) by
deivid-rodriguez
* Prefer `require_relative` for all internal requires. Pull request [#4978](https://github.com/rubygems/rubygems/pull/4978)
by deivid-rodriguez
* Add missing `require` of `time` within
`Gem::Request.verify_certificate_message`. Pull request [#4975](https://github.com/rubygems/rubygems/pull/4975) by nobu
* Install bundler 2.2.30 as a default gem.

## Performance:

* Speed up `gem install`, specially under Windows. Pull request [#4960](https://github.com/rubygems/rubygems/pull/4960) by
deivid-rodriguez

# 3.2.29 / 2021-10-08

## Enhancements:

* Only disallow FIXME/TODO for first word of gemspec description. Pull
request [#4937](https://github.com/rubygems/rubygems/pull/4937) by duckinator
* Install bundler 2.2.29 as a default gem.

## Bug fixes:

* Fix `wordy` method in `SourceFetchProblem` changing the password of
source. Pull request [#4910](https://github.com/rubygems/rubygems/pull/4910) by Huangxiaodui

## Performance:

* Improve `require` performance, particularly on systems with a lot of
gems installed. Pull request [#4951](https://github.com/rubygems/rubygems/pull/4951) by pocke

# 3.2.28 / 2021-09-23

## Enhancements:

* Support MINGW-UCRT. Pull request [#4925](https://github.com/rubygems/rubygems/pull/4925) by hsbt
* Only check if descriptions *start with* FIXME/TODO. Pull request [#4841](https://github.com/rubygems/rubygems/pull/4841)
by duckinator
* Avoid loading `uri` unnecessarily when activating gems. Pull request
[#4897](https://github.com/rubygems/rubygems/pull/4897) by deivid-rodriguez
* Install bundler 2.2.28 as a default gem.

## Bug fixes:

* Fix redacted credentials being sent to gemserver. Pull request [#4919](https://github.com/rubygems/rubygems/pull/4919) by
jdliss

# 3.2.27 / 2021-09-03

## Enhancements:

* Redact credentials when printing URI. Pull request [#4868](https://github.com/rubygems/rubygems/pull/4868) by intuxicated
* Prefer `require_relative` to `require` for internal requires. Pull
request [#4858](https://github.com/rubygems/rubygems/pull/4858) by deivid-rodriguez
* Prioritise gems with higher version for fetching metadata, and stop
fetching once we find a valid candidate. Pull request [#4843](https://github.com/rubygems/rubygems/pull/4843) by intuxicated
* Install bundler 2.2.27 as a default gem.

# 3.2.26 / 2021-08-17

## Enhancements:

* Enhance the error handling for loading the
`rubygems/defaults/operating_system` file. Pull request [#4824](https://github.com/rubygems/rubygems/pull/4824) by
intuxicated
* Ignore `RUBYGEMS_GEMDEPS` for the bundler gem. Pull request [#4532](https://github.com/rubygems/rubygems/pull/4532) by
deivid-rodriguez
* Install bundler 2.2.26 as a default gem.

## Bug fixes:

* Also load user installed rubygems plugins. Pull request [#4829](https://github.com/rubygems/rubygems/pull/4829) by
deivid-rodriguez

# 3.2.25 / 2021-07-30

## Enhancements:

* Don't load the `base64` library since it's not used. Pull request [#4785](https://github.com/rubygems/rubygems/pull/4785)
by deivid-rodriguez
* Don't load the `resolv` library since it's not used. Pull request [#4784](https://github.com/rubygems/rubygems/pull/4784)
by deivid-rodriguez
* Lazily load `shellwords` library. Pull request [#4783](https://github.com/rubygems/rubygems/pull/4783) by deivid-rodriguez
* Check requirements class before loading marshalled requirements. Pull
request [#4651](https://github.com/rubygems/rubygems/pull/4651) by nobu
* Install bundler 2.2.25 as a default gem.

## Bug fixes:

* Add missing `require 'fileutils'` in `Gem::ConfigFile`. Pull request
[#4768](https://github.com/rubygems/rubygems/pull/4768) by ybiquitous

# 3.2.24 / 2021-07-15

## Enhancements:

* Install bundler 2.2.24 as a default gem.

## Bug fixes:

* Fix contradictory message about deletion of default gem. Pull request
[#4739](https://github.com/rubygems/rubygems/pull/4739) by jaredbeck

## Documentation:

* Add a description about `GEM_HOST_OTP_CODE` to help text. Pull request
[#4742](https://github.com/rubygems/rubygems/pull/4742) by ybiquitous

# 3.2.23 / 2021-07-09

## Enhancements:

* Rewind IO source to allow working with contents in memory. Pull request
[#4729](https://github.com/rubygems/rubygems/pull/4729) by drcapulet
* Install bundler 2.2.23 as a default gem.

# 3.2.22 / 2021-07-06

## Enhancements:

* Allow setting `--otp` via `GEM_HOST_OTP_CODE`. Pull request [#4697](https://github.com/rubygems/rubygems/pull/4697) by
CGA1123
* Fixes for the edge case when openssl library is missing. Pull request
[#4695](https://github.com/rubygems/rubygems/pull/4695) by rhenium
* Install bundler 2.2.22 as a default gem.

# 3.2.21 / 2021-06-23

## Enhancements:

* Fix typo in OpenSSL detection. Pull request [#4679](https://github.com/rubygems/rubygems/pull/4679) by osyoyu
* Add the most recent licenses from spdx.org. Pull request [#4662](https://github.com/rubygems/rubygems/pull/4662) by nobu
* Simplify setup.rb code to allow installing rubygems from source on
truffleruby 21.0 and 21.1. Pull request [#4624](https://github.com/rubygems/rubygems/pull/4624) by deivid-rodriguez
* Install bundler 2.2.21 as a default gem.

## Bug fixes:

* Create credentials folder when setting API keys if not there yet. Pull
request [#4665](https://github.com/rubygems/rubygems/pull/4665) by deivid-rodriguez

# 3.2.20 / 2021-06-11

## Security fixes:

* Verify platform before installing to avoid potential remote code
execution. Pull request [#4667](https://github.com/rubygems/rubygems/pull/4667) by sonalkr132

## Enhancements:

* Add better specification policy error description. Pull request [#4658](https://github.com/rubygems/rubygems/pull/4658) by
ceritium
* Install bundler 2.2.20 as a default gem.

# 3.2.19 / 2021-05-31

## Enhancements:

* Fix `gem help build` output format. Pull request [#4613](https://github.com/rubygems/rubygems/pull/4613) by tnir
* Install bundler 2.2.19 as a default gem.

# 3.2.18 / 2021-05-25

## Enhancements:

* Don't leave temporary directory around when building extensions to
improve build reproducibility. Pull request [#4610](https://github.com/rubygems/rubygems/pull/4610) by baloo
* Install bundler 2.2.18 as a default gem.

# 3.2.17 / 2021-05-05

## Enhancements:

* Only print month & year in deprecation messages. Pull request [#3085](https://github.com/rubygems/rubygems/pull/3085) by
Schwad
* Make deprecate method support ruby3's keyword arguments. Pull request
[#4558](https://github.com/rubygems/rubygems/pull/4558) by mame
* Update the default bindir on macOS. Pull request [#4524](https://github.com/rubygems/rubygems/pull/4524) by nobu
* Prefer File.open instead of Kernel#open. Pull request [#4529](https://github.com/rubygems/rubygems/pull/4529) by mame
* Install bundler 2.2.17 as a default gem.

## Documentation:

* Fix usage messages to reflect the current POSIX-compatible behaviour.
Pull request [#4551](https://github.com/rubygems/rubygems/pull/4551) by graywolf-at-work

# 3.2.16 / 2021-04-08

## Enhancements:

* Install bundler 2.2.16 as a default gem.

## Bug fixes:

* Correctly handle symlinks. Pull request [#2836](https://github.com/rubygems/rubygems/pull/2836) by voxik

# 3.2.15 / 2021-03-19

## Enhancements:

* Prevent downgrades to untested rubygems versions. Pull request [#4460](https://github.com/rubygems/rubygems/pull/4460) by
deivid-rodriguez
* Install bundler 2.2.15 as a default gem.

## Bug fixes:

* Fix missing require breaking `gem cert`. Pull request [#4464](https://github.com/rubygems/rubygems/pull/4464) by lukehinds

# 3.2.14 / 2021-03-08

## Enhancements:

* Less wrapping of network errors. Pull request [#4064](https://github.com/rubygems/rubygems/pull/4064) by deivid-rodriguez
* Install bundler 2.2.14 as a default gem.

## Bug fixes:

* Revert addition of support for `musl` variants to restore graceful
fallback on Alpine. Pull request [#4434](https://github.com/rubygems/rubygems/pull/4434) by deivid-rodriguez

# 3.2.13 / 2021-03-03

## Enhancements:

* Install bundler 2.2.13 as a default gem.

## Bug fixes:

* Support non-gnu libc linux platforms. Pull request [#4082](https://github.com/rubygems/rubygems/pull/4082) by lloeki

# 3.2.12 / 2021-03-01

## Enhancements:

* Install bundler 2.2.12 as a default gem.

## Bug fixes:

* Restore the ability to manually install extension gems. Pull request
[#4384](https://github.com/rubygems/rubygems/pull/4384) by cfis

# 3.2.11 / 2021-02-17

## Enhancements:

* Optionally fallback to IPv4 when IPv6 is unreachable. Pull request [#2662](https://github.com/rubygems/rubygems/pull/2662)
by sonalkr132
* Install bundler 2.2.11 as a default gem.

# 3.2.10 / 2021-02-15

## Enhancements:

* Install bundler 2.2.10 as a default gem.

## Documentation:

* Add a `gem push` example to `gem help`. Pull request [#4373](https://github.com/rubygems/rubygems/pull/4373) by
deivid-rodriguez
* Improve documentation for `required_ruby_version`. Pull request [#4343](https://github.com/rubygems/rubygems/pull/4343) by
AlexWayfer

# 3.2.9 / 2021-02-08

## Enhancements:

* Install bundler 2.2.9 as a default gem.

## Bug fixes:

* Fix error message when underscore selection can't find bundler. Pull
request [#4363](https://github.com/rubygems/rubygems/pull/4363) by deivid-rodriguez
* Fix `Gem::Specification.stubs_for` returning wrong named specs. Pull
request [#4356](https://github.com/rubygems/rubygems/pull/4356) by tompng
* Don't error out when activating a binstub unless necessary. Pull request
[#4351](https://github.com/rubygems/rubygems/pull/4351) by deivid-rodriguez
* Fix `gem outdated` incorrectly handling platform specific gems. Pull
request [#4248](https://github.com/rubygems/rubygems/pull/4248) by deivid-rodriguez

# 3.2.8 / 2021-02-02

## Enhancements:

* Install bundler 2.2.8 as a default gem.

## Bug fixes:

* Fix `gem install` crashing on gemspec with nil required_ruby_version.
Pull request [#4334](https://github.com/rubygems/rubygems/pull/4334) by pbernays

# 3.2.7 / 2021-01-26

## Enhancements:

* Install bundler 2.2.7 as a default gem.

## Bug fixes:

* Generate plugin wrappers with relative requires. Pull request [#4317](https://github.com/rubygems/rubygems/pull/4317) by
deivid-rodriguez

# 3.2.6 / 2021-01-18

## Enhancements:

* Fix `Gem::Platform#inspect` showing duplicate information. Pull request
[#4276](https://github.com/rubygems/rubygems/pull/4276) by deivid-rodriguez
* Install bundler 2.2.6 as a default gem.

## Bug fixes:

* Swallow any system call error in `ensure_gem_subdirs` to support jruby
embedded paths. Pull request [#4291](https://github.com/rubygems/rubygems/pull/4291) by kares
* Restore accepting custom make command with extra options as the `make`
env variable. Pull request [#4271](https://github.com/rubygems/rubygems/pull/4271) by terceiro

# 3.2.5 / 2021-01-11

## Enhancements:

* Install bundler 2.2.5 as a default gem.

## Bug fixes:

* Don't load more specs after the whole set of specs has been setup. Pull
request [#4262](https://github.com/rubygems/rubygems/pull/4262) by deivid-rodriguez
* Fix broken `bundler` executable after `gem update --system`. Pull
request [#4221](https://github.com/rubygems/rubygems/pull/4221) by deivid-rodriguez

# 3.2.4 / 2020-12-31

## Enhancements:

* Use a CHANGELOG in markdown for rubygems. Pull request [#4168](https://github.com/rubygems/rubygems/pull/4168) by
deivid-rodriguez
* Never spawn subshells when building extensions. Pull request [#4190](https://github.com/rubygems/rubygems/pull/4190) by
deivid-rodriguez
* Install bundler 2.2.4 as a default gem.

## Bug fixes:

* Fix fallback to the old index and installation from it not working. Pull
request [#4213](https://github.com/rubygems/rubygems/pull/4213) by deivid-rodriguez
* Fix installing from source on truffleruby. Pull request [#4201](https://github.com/rubygems/rubygems/pull/4201) by
deivid-rodriguez


------------------------------------------------------------------------------

RubyGems installed the following executables:
/Users/jackiequ/.rvm/rubies/ruby-3.0.0/bin/gem
/Users/jackiequ/.rvm/rubies/ruby-3.0.0/bin/bundle
/Users/jackiequ/.rvm/rubies/ruby-3.0.0/bin/bundler

Ruby Interactive (ri) documentation was installed. ri is kind of like man
pages for Ruby libraries. You may access it like this:
ri Classname
ri Classname.class_method
ri Classname#instance_method
If you do not wish to install this documentation in the future, use the
--no-document flag, or set it as the default in your ~/.gemrc file. See
'gem help env' for details.

RubyGems system software updated

RVM 的安装与使用

官网:https://rvm.io/ - 中文网:https://ruby-china.org/wiki/rvm-guide

建议科学上网,若采用国内镜像源,可能由于镜像源不同步 / 不完整 / 依赖关系冲突,导致报错

  • 1、下载安装,命令如下

    1
    curl -L get.rvm.io | bash -s stable
  • 终端输出如下
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
      % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
    Dload Upload Total Spent Left Speed
    100 194 100 194 0 0 109 0 0:00:01 0:00:01 --:--:-- 109
    100 24532 100 24532 0 0 8582 0 0:00:02 0:00:02 --:--:-- 79649
    Downloading https://github.com/rvm/rvm/archive/1.29.12.tar.gz
    Downloading https://github.com/rvm/rvm/releases/download/1.29.12/1.29.12.tar.gz.asc
    Found PGP signature at: 'https://github.com/rvm/rvm/releases/download/1.29.12/1.29.12.tar.gz.asc',
    but no GPG software exists to validate it, skipping.
    Installing RVM to /Users/jackiequ/.rvm/
    Adding rvm PATH line to /Users/jackiequ/.profile /Users/jackiequ/.mkshrc /Users/jackiequ/.bashrc /Users/jackiequ/.zshrc.
    Adding rvm loading line to /Users/jackiequ/.profile /Users/jackiequ/.bash_profile /Users/jackiequ/.zlogin.
    Installation of RVM in /Users/jackiequ/.rvm/ is almost complete:

    * To start using RVM you need to run `source /Users/jackiequ/.rvm/scripts/rvm`
    in all your open shell windows, in rare cases you need to reopen all shell windows.
    Thanks for installing RVM 🙏
    Please consider donating to our open collective to help us maintain RVM.

    👉 Donate: https://opencollective.com/rvm/donate
  • 2、重载配置文件,命令如下

    1
    2
    source ~/.bashrc
    source ~/.bash_profile
  • 3、查看版本,命令如下

    1
    rvm -v
  • 终端输出如下
    1
    rvm 1.29.12 (latest) by Michal Papis, Piotr Kuczynski, Wayne E. Seguin [https://rvm.io]
  • 4、列出已知 Ruby 版本,命令如下

    1
    rvm list known
  • 终端输出如下
    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
    # MRI Rubies
    [ruby-]1.8.6[-p420]
    [ruby-]1.8.7[-head] # security released on head
    [ruby-]1.9.1[-p431]
    [ruby-]1.9.2[-p330]
    [ruby-]1.9.3[-p551]
    [ruby-]2.0.0[-p648]
    [ruby-]2.1[.10]
    [ruby-]2.2[.10]
    [ruby-]2.3[.8]
    [ruby-]2.4[.10]
    [ruby-]2.5[.8]
    [ruby-]2.6[.6]
    [ruby-]2.7[.2]
    [ruby-]3[.0.0]
    ruby-head

    # for forks use: rvm install ruby-head-<name> --url https://github.com/github/ruby.git --branch 2.2

    # JRuby
    jruby-1.6[.8]
    jruby-1.7[.27]
    jruby-9.1[.17.0]
    jruby[-9.2.14.0]
    jruby-head

    # Rubinius
    rbx-1[.4.3]
    rbx-2.3[.0]
    rbx-2.4[.1]
    rbx-2[.5.8]
    rbx-3[.107]
    rbx-4[.20]
    rbx-5[.0]
    rbx-head

    # TruffleRuby
    truffleruby[-20.3.0]

    # Opal
    opal

    # Minimalistic ruby implementation - ISO 30170:2012
    mruby-1.0.0
    mruby-1.1.0
    mruby-1.2.0
    mruby-1.3.0
    mruby-1[.4.1]
    mruby-2.0.1
    mruby-2[.1.1]
    mruby[-head]

    # Ruby Enterprise Edition
    ree-1.8.6
    ree[-1.8.7][-2012.02]

    # Topaz
    topaz

    # MagLev
    maglev-1.0.0
    maglev-1.1[RC1]
    maglev[-1.2Alpha4]
    maglev-head

    # Mac OS X Snow Leopard Or Newer
    macruby-0.10
    macruby-0.11
    macruby[-0.12]
    macruby-nightly
    macruby-head

    # IronRuby
    ironruby[-1.1.3]
    ironruby-head
  • 5、安装指定版本 Ruby,命令如下

    1
    rvm install 3.0.0
  • 终端报错如下
    【依赖问题,需先安装 Homebrew,详见Homebrew 的安装与使用.md
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    No binary rubies available for: osx/14.4/x86_64/ruby-3.0.0.
    Continuing with compilation. Please read 'rvm help mount' to get more information on binary rubies.
    Checking requirements for osx.
    Installing requirements for osx.
    Updating system - please wait
    Installing required packages: autoconf, automake, libtool, pkg-config, coreutils, libyaml, libksba, readline, zlib, openssl@1.1 - please wait
    There were package installation errors, make sure to read the log.

    Try `brew tap --repair` and make sure `brew doctor` looks reasonable.

    Check Homebrew requirements https://docs.brew.sh/Installation
    Error running 'requirements_osx_brew_libs_install autoconf automake libtool pkg-config coreutils libyaml libksba readline zlib openssl@1.1',
    please read /Users/jackiequ/.rvm/log/1710891506_ruby-3.0.0/package_install_autoconf_automake_libtool_pkg-config_coreutils_libyaml_libksba_readline_zlib_openssl@1.1.log
    Requirements installation failed with status: 1.
    【网络问题 1,建议科学上网】
    1
    2
    3
    4
    5
    6
    7
    Searching for binary rubies, this might take some time.
    No binary rubies available for: osx/14.4/x86_64/ruby-3.0.0.
    Continuing with compilation. Please read 'rvm help mount' to get more information on binary rubies.
    Checking requirements for osx.
    Installing requirements for osx.
    Updating system - please wait
    Installing required packages: autoconf, automake, libtool, pkg-config, coreutils, libyaml, libksba, readline, zlib, openssl@1.1 - please wait
    【网络问题 2,建议科学上网】
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    Searching for binary rubies, this might take some time.
    No binary rubies available for: osx/14.4/x86_64/ruby-3.0.0.
    Continuing with compilation. Please read 'rvm help mount' to get more information on binary rubies.
    Checking requirements for osx.
    Installing requirements for osx.
    Updating system - please wait
    Installing required packages: autoconf, automake, libtool, pkg-config, coreutils, libyaml, libksba, readline, zlib, openssl@1.1 - please wait
    There were package installation errors, make sure to read the log.

    Try `brew tap --repair` and make sure `brew doctor` looks reasonable.

    Check Homebrew requirements https://docs.brew.sh/Installation
    Error running 'requirements_osx_brew_libs_install autoconf automake libtool pkg-config coreutils libyaml libksba readline zlib openssl@1.1',
    please read /Users/jackiequ/.rvm/log/1710891506_ruby-3.0.0/package_install_autoconf_automake_libtool_pkg-config_coreutils_libyaml_libksba_readline_zlib_openssl@1.1.log
    Requirements installation failed with status: 1.
    【网络问题 3,建议科学上网】
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    Searching for binary rubies, this might take some time.
    No binary rubies available for: osx/14.4/x86_64/ruby-3.0.0.
    Continuing with compilation. Please read 'rvm help mount' to get more information on binary rubies.
    Checking requirements for osx.
    Installing requirements for osx.
    Updating system - please wait
    Failed to update Homebrew, follow instructions at

    https://docs.brew.sh/Common-Issues

    and make sure `brew update` works before continuing.
    Error running 'requirements_osx_brew_update_system ruby-3.0.0',
    please read /Users/jackiequ/.rvm/log/1710943526_ruby-3.0.0/update_system.log
    Requirements installation failed with status: 1.
  • 终端输出如下

    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
    Searching for binary rubies, this might take some time.
    No binary rubies available for: osx/14.4/x86_64/ruby-3.0.0.
    Continuing with compilation. Please read 'rvm help mount' to get more information on binary rubies.
    Checking requirements for osx.
    Installing requirements for osx.
    Updating system - please wait
    Installing required packages: openssl@1.1 - please wait
    Certificates bundle '/usr/local/etc/openssl@1.1/cert.pem' is already up to date.
    Requirements installation successful.
    Installing Ruby from source to: /Users/jackiequ/.rvm/rubies/ruby-3.0.0, this may take a while depending on your cpu(s)...
    ruby-3.0.0 - #downloading ruby-3.0.0, this may take a while depending on your connection...
    % Total % Received % Xferd Average Speed Time Time Time Current
    Dload Upload Total Spent Left Speed
    100 18.6M 100 18.6M 0 0 69555 0 0:04:40 0:04:40 --:--:-- 77673
    ruby-3.0.0 - #extracting ruby-3.0.0 to /Users/jackiequ/.rvm/src/ruby-3.0.0 - please wait
    ruby-3.0.0 - #configuring - please wait
    ruby-3.0.0 - #post-configuration - please wait
    ruby-3.0.0 - #compiling - please wait
    ruby-3.0.0 - #installing - please wait
    ruby-3.0.0 - #making binaries executable - please wait
    Installed rubygems 3.2.3 is newer than 3.0.9 provided with installed ruby, skipping installation, use --force to force installation.
    ruby-3.0.0 - #gemset created /Users/jackiequ/.rvm/gems/ruby-3.0.0@global
    ruby-3.0.0 - #importing gemset /Users/jackiequ/.rvm/gemsets/global.gems - please wait
    ruby-3.0.0 - #generating global wrappers - please wait
    ruby-3.0.0 - #gemset created /Users/jackiequ/.rvm/gems/ruby-3.0.0
    ruby-3.0.0 - #importing gemsetfile /Users/jackiequ/.rvm/gemsets/default.gems evaluated to empty gem list
    ruby-3.0.0 - #generating default wrappers - please wait
    ruby-3.0.0 - #adjusting #shebangs for (gem irb erb ri rdoc testrb rake).
    Install of ruby-3.0.0 - #complete
    Ruby was built without documentation, to build it run: rvm docs generate-ri
  • 6、列出已装 Ruby 版本,命令如下

    1
    rvm list
  • 终端输出如下
    1
    2
    3
    4
    5
    =* ruby-3.0.0 [ x86_64 ]

    # => - current
    # =* - current && default
    # * - default
  • 7、设置默认 Ruby 版本,命令如下

    1
    rvm use 3.0.0 --default
  • 终端输出如下
    1
    Using /Users/jackiequ/.rvm/gems/ruby-3.0.0
  • 8、查看 Ruby 版本,命令如下

    1
    ruby -v
  • 终端输出如下
    1
    ruby 3.0.0p0 (2020-12-25 revision 95aff21468) [x86_64-darwin23]

仅供参考

Homebrew 的安装与使用

官网:https://brew.sh/zh-cn/

建议科学上网,若采用国内镜像源,可能由于镜像源不同步 / 不完整 / 依赖关系冲突,导致报错

  • 1、下载安装,命令如下

    1
    /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
  • 终端输出如下【有部分报错信息,但并未影响使用】
    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
    227
    228
    229
    230
    231
    232
    233
    234
    235
    236
    237
    238
    239
    240
    241
    242
    243
    244
    245
    246
    247
    248
    249
    250
    251
    252
    253
    254
    255
    256
    257
    258
    259
    260
    261
    262
    263
    264
    265
    266
    267
    268
    269
    270
    271
    272
    273
    274
    275
    276
    277
    278
    279
    280
    281
    282
    283
    284
    285
    286
    287
    288
    289
    290
    291
    292
    293
    294
    295
    296
    297
    298
    299
    300
    301
    302
    303
    304
    305
    306
    307
    308
    309
    310
    311
    312
    313
    314
    315
    316
    317
    318
    319
    320
    321
    322
    323
    324
    325
    326
    327
    328
    329
    330
    331
    332
    333
    334
    335
    336
    337
    338
    339
    340
    341
    342
    343
    344
    345
    346
    347
    348
    349
    350
    351
    352
    353
    354
    355
    356
    357
    358
    359
    360
    361
    362
    363
    364
    365
    366
    367
    368
    369
    370
    371
    372
    373
    374
    375
    376
    377
    378
    379
    380
    381
    382
    383
    384
    385
    386
    387
    388
    389
    390
    391
    392
    393
    394
    395
    396
    397
    398
    399
    400
    401
    402
    403
    404
    405
    406
    407
    408
    409
    410
    411
    412
    413
    414
    415
    416
    417
    418
    419
    420
    421
    422
    423
    424
    425
    426
    427
    428
    429
    430
    431
    432
    433
    434
    435
    436
    437
    438
    439
    440
    441
    442
    443
    444
    445
    446
    447
    448
    449
    450
    451
    452
    453
    454
    455
    456
    457
    458
    459
    460
    curl: (56) Recv failure: Operation timed out
    ==> Checking for `sudo` access (which may request your password)...
    Password:
    ==> This script will install:
    /usr/local/bin/brew
    /usr/local/share/doc/homebrew
    /usr/local/share/man/man1/brew.1
    /usr/local/share/zsh/site-functions/_brew
    /usr/local/etc/bash_completion.d/brew
    /usr/local/Homebrew
    ==> The following new directories will be created:
    /usr/local/bin
    /usr/local/etc
    /usr/local/include
    /usr/local/lib
    /usr/local/sbin
    /usr/local/share
    /usr/local/var
    /usr/local/opt
    /usr/local/share/zsh
    /usr/local/share/zsh/site-functions
    /usr/local/var/homebrew
    /usr/local/var/homebrew/linked
    /usr/local/Cellar
    /usr/local/Caskroom
    /usr/local/Frameworks
    ==> The Xcode Command Line Tools will be installed.

    Press RETURN/ENTER to continue or any other key to abort:
    ==> /usr/bin/sudo /bin/mkdir -p /usr/local/bin /usr/local/etc /usr/local/include /usr/local/lib /usr/local/sbin /usr/local/share /usr/local/var /usr/local/opt /usr/local/share/zsh /usr/local/share/zsh/site-functions /usr/local/var/homebrew /usr/local/var/homebrew/linked /usr/local/Cellar /usr/local/Caskroom /usr/local/Frameworks
    ==> /usr/bin/sudo /bin/chmod ug=rwx /usr/local/bin /usr/local/etc /usr/local/include /usr/local/lib /usr/local/sbin /usr/local/share /usr/local/var /usr/local/opt /usr/local/share/zsh /usr/local/share/zsh/site-functions /usr/local/var/homebrew /usr/local/var/homebrew/linked /usr/local/Cellar /usr/local/Caskroom /usr/local/Frameworks
    ==> /usr/bin/sudo /bin/chmod go-w /usr/local/share/zsh /usr/local/share/zsh/site-functions
    ==> /usr/bin/sudo /usr/sbin/chown jackiequ /usr/local/bin /usr/local/etc /usr/local/include /usr/local/lib /usr/local/sbin /usr/local/share /usr/local/var /usr/local/opt /usr/local/share/zsh /usr/local/share/zsh/site-functions /usr/local/var/homebrew /usr/local/var/homebrew/linked /usr/local/Cellar /usr/local/Caskroom /usr/local/Frameworks
    ==> /usr/bin/sudo /usr/bin/chgrp admin /usr/local/bin /usr/local/etc /usr/local/include /usr/local/lib /usr/local/sbin /usr/local/share /usr/local/var /usr/local/opt /usr/local/share/zsh /usr/local/share/zsh/site-functions /usr/local/var/homebrew /usr/local/var/homebrew/linked /usr/local/Cellar /usr/local/Caskroom /usr/local/Frameworks
    ==> /usr/bin/sudo /bin/mkdir -p /usr/local/Homebrew
    ==> /usr/bin/sudo /usr/sbin/chown -R jackiequ:admin /usr/local/Homebrew
    ==> /usr/bin/sudo /bin/mkdir -p /Users/jackiequ/Library/Caches/Homebrew
    ==> /usr/bin/sudo /bin/chmod g+rwx /Users/jackiequ/Library/Caches/Homebrew
    ==> /usr/bin/sudo /usr/sbin/chown -R jackiequ /Users/jackiequ/Library/Caches/Homebrew
    ==> Searching online for the Command Line Tools
    ==> /usr/bin/sudo /usr/bin/touch /tmp/.com.apple.dt.CommandLineTools.installondemand.in-progress
    ==> Installing Command Line Tools for Xcode-15.3
    ==> /usr/bin/sudo /usr/sbin/softwareupdate -i Command\ Line\ Tools\ for\ Xcode-15.3
    Software Update Tool

    Finding available software

    Downloading Command Line Tools for Xcode
    Downloaded Command Line Tools for Xcode
    Installing Command Line Tools for Xcode
    Done with Command Line Tools for Xcode
    Done.
    ==> /usr/bin/sudo /usr/bin/xcode-select --switch /Library/Developer/CommandLineTools
    ==> /usr/bin/sudo /bin/rm -f /tmp/.com.apple.dt.CommandLineTools.installondemand.in-progress
    ==> Downloading and installing Homebrew...
    remote: Enumerating objects: 261609, done.
    remote: Counting objects: 100% (31654/31654), done.
    remote: Compressing objects: 100% (1356/1356), done.
    remote: Total 261609 (delta 30728), reused 30817 (delta 30245), pack-reused 229955
    Receiving objects: 100% (261609/261609), 77.13 MiB | 9.86 MiB/s, done.
    Resolving deltas: 100% (189418/189418), done.
    From https://github.com/Homebrew/brew
    * [new branch] analytics_command_run_test_bot -> origin/analytics_command_run_test_bot
    * [new branch] bump_no_tap -> origin/bump_no_tap
    * [new branch] dependabot/bundler/Library/Homebrew/json_schemer-2.2.1 -> origin/dependabot/bundler/Library/Homebrew/json_schemer-2.2.1
    * [new branch] fix-version-type -> origin/fix-version-type
    * [new branch] load-internal-cask-json-v3 -> origin/load-internal-cask-json-v3
    * [new branch] master -> origin/master
    * [new branch] ported-cmds -> origin/ported-cmds
    * [new branch] service_require_root_no_run -> origin/service_require_root_no_run
    * [new branch] tapioca-compiler-for-tty-rbi -> origin/tapioca-compiler-for-tty-rbi
    * [new tag] 0.1 -> 0.1
    * [new tag] 0.2 -> 0.2
    * [new tag] 0.3 -> 0.3
    * [new tag] 0.4 -> 0.4
    * [new tag] 0.5 -> 0.5
    * [new tag] 0.6 -> 0.6
    * [new tag] 0.7 -> 0.7
    * [new tag] 0.7.1 -> 0.7.1
    * [new tag] 0.8 -> 0.8
    * [new tag] 0.8.1 -> 0.8.1
    * [new tag] 0.9 -> 0.9
    * [new tag] 0.9.1 -> 0.9.1
    * [new tag] 0.9.2 -> 0.9.2
    * [new tag] 0.9.3 -> 0.9.3
    * [new tag] 0.9.4 -> 0.9.4
    * [new tag] 0.9.5 -> 0.9.5
    * [new tag] 0.9.8 -> 0.9.8
    * [new tag] 0.9.9 -> 0.9.9
    * [new tag] 1.0.0 -> 1.0.0
    * [new tag] 1.0.1 -> 1.0.1
    * [new tag] 1.0.2 -> 1.0.2
    * [new tag] 1.0.3 -> 1.0.3
    * [new tag] 1.0.4 -> 1.0.4
    * [new tag] 1.0.5 -> 1.0.5
    * [new tag] 1.0.6 -> 1.0.6
    * [new tag] 1.0.7 -> 1.0.7
    * [new tag] 1.0.8 -> 1.0.8
    * [new tag] 1.0.9 -> 1.0.9
    * [new tag] 1.1.0 -> 1.1.0
    * [new tag] 1.1.1 -> 1.1.1
    * [new tag] 1.1.10 -> 1.1.10
    * [new tag] 1.1.11 -> 1.1.11
    * [new tag] 1.1.12 -> 1.1.12
    * [new tag] 1.1.13 -> 1.1.13
    * [new tag] 1.1.2 -> 1.1.2
    * [new tag] 1.1.3 -> 1.1.3
    * [new tag] 1.1.4 -> 1.1.4
    * [new tag] 1.1.5 -> 1.1.5
    * [new tag] 1.1.6 -> 1.1.6
    * [new tag] 1.1.7 -> 1.1.7
    * [new tag] 1.1.8 -> 1.1.8
    * [new tag] 1.1.9 -> 1.1.9
    * [new tag] 1.2.0 -> 1.2.0
    * [new tag] 1.2.1 -> 1.2.1
    * [new tag] 1.2.2 -> 1.2.2
    * [new tag] 1.2.3 -> 1.2.3
    * [new tag] 1.2.4 -> 1.2.4
    * [new tag] 1.2.5 -> 1.2.5
    * [new tag] 1.2.6 -> 1.2.6
    * [new tag] 1.3.0 -> 1.3.0
    * [new tag] 1.3.1 -> 1.3.1
    * [new tag] 1.3.2 -> 1.3.2
    * [new tag] 1.3.3 -> 1.3.3
    * [new tag] 1.3.4 -> 1.3.4
    * [new tag] 1.3.5 -> 1.3.5
    * [new tag] 1.3.6 -> 1.3.6
    * [new tag] 1.3.7 -> 1.3.7
    * [new tag] 1.3.8 -> 1.3.8
    * [new tag] 1.3.9 -> 1.3.9
    * [new tag] 1.4.0 -> 1.4.0
    * [new tag] 1.4.1 -> 1.4.1
    * [new tag] 1.4.2 -> 1.4.2
    * [new tag] 1.4.3 -> 1.4.3
    * [new tag] 1.5.0 -> 1.5.0
    * [new tag] 1.5.1 -> 1.5.1
    * [new tag] 1.5.10 -> 1.5.10
    * [new tag] 1.5.11 -> 1.5.11
    * [new tag] 1.5.12 -> 1.5.12
    * [new tag] 1.5.13 -> 1.5.13
    * [new tag] 1.5.14 -> 1.5.14
    * [new tag] 1.5.2 -> 1.5.2
    * [new tag] 1.5.3 -> 1.5.3
    * [new tag] 1.5.4 -> 1.5.4
    * [new tag] 1.5.5 -> 1.5.5
    * [new tag] 1.5.6 -> 1.5.6
    * [new tag] 1.5.7 -> 1.5.7
    * [new tag] 1.5.8 -> 1.5.8
    * [new tag] 1.5.9 -> 1.5.9
    * [new tag] 1.6.0 -> 1.6.0
    * [new tag] 1.6.1 -> 1.6.1
    * [new tag] 1.6.10 -> 1.6.10
    * [new tag] 1.6.11 -> 1.6.11
    * [new tag] 1.6.12 -> 1.6.12
    * [new tag] 1.6.13 -> 1.6.13
    * [new tag] 1.6.14 -> 1.6.14
    * [new tag] 1.6.15 -> 1.6.15
    * [new tag] 1.6.16 -> 1.6.16
    * [new tag] 1.6.17 -> 1.6.17
    * [new tag] 1.6.2 -> 1.6.2
    * [new tag] 1.6.3 -> 1.6.3
    * [new tag] 1.6.4 -> 1.6.4
    * [new tag] 1.6.5 -> 1.6.5
    * [new tag] 1.6.6 -> 1.6.6
    * [new tag] 1.6.7 -> 1.6.7
    * [new tag] 1.6.8 -> 1.6.8
    * [new tag] 1.6.9 -> 1.6.9
    * [new tag] 1.7.0 -> 1.7.0
    * [new tag] 1.7.1 -> 1.7.1
    * [new tag] 1.7.2 -> 1.7.2
    * [new tag] 1.7.3 -> 1.7.3
    * [new tag] 1.7.4 -> 1.7.4
    * [new tag] 1.7.5 -> 1.7.5
    * [new tag] 1.7.6 -> 1.7.6
    * [new tag] 1.7.7 -> 1.7.7
    * [new tag] 1.8.0 -> 1.8.0
    * [new tag] 1.8.1 -> 1.8.1
    * [new tag] 1.8.2 -> 1.8.2
    * [new tag] 1.8.3 -> 1.8.3
    * [new tag] 1.8.4 -> 1.8.4
    * [new tag] 1.8.5 -> 1.8.5
    * [new tag] 1.8.6 -> 1.8.6
    * [new tag] 1.9.0 -> 1.9.0
    * [new tag] 1.9.1 -> 1.9.1
    * [new tag] 1.9.2 -> 1.9.2
    * [new tag] 1.9.3 -> 1.9.3
    * [new tag] 2.0.0 -> 2.0.0
    * [new tag] 2.0.1 -> 2.0.1
    * [new tag] 2.0.2 -> 2.0.2
    * [new tag] 2.0.3 -> 2.0.3
    * [new tag] 2.0.4 -> 2.0.4
    * [new tag] 2.0.5 -> 2.0.5
    * [new tag] 2.0.6 -> 2.0.6
    * [new tag] 2.1.0 -> 2.1.0
    * [new tag] 2.1.1 -> 2.1.1
    * [new tag] 2.1.10 -> 2.1.10
    * [new tag] 2.1.11 -> 2.1.11
    * [new tag] 2.1.12 -> 2.1.12
    * [new tag] 2.1.13 -> 2.1.13
    * [new tag] 2.1.14 -> 2.1.14
    * [new tag] 2.1.15 -> 2.1.15
    * [new tag] 2.1.16 -> 2.1.16
    * [new tag] 2.1.2 -> 2.1.2
    * [new tag] 2.1.3 -> 2.1.3
    * [new tag] 2.1.4 -> 2.1.4
    * [new tag] 2.1.5 -> 2.1.5
    * [new tag] 2.1.6 -> 2.1.6
    * [new tag] 2.1.7 -> 2.1.7
    * [new tag] 2.1.8 -> 2.1.8
    * [new tag] 2.1.9 -> 2.1.9
    * [new tag] 2.2.0 -> 2.2.0
    * [new tag] 2.2.1 -> 2.2.1
    * [new tag] 2.2.10 -> 2.2.10
    * [new tag] 2.2.11 -> 2.2.11
    * [new tag] 2.2.12 -> 2.2.12
    * [new tag] 2.2.13 -> 2.2.13
    * [new tag] 2.2.14 -> 2.2.14
    * [new tag] 2.2.15 -> 2.2.15
    * [new tag] 2.2.16 -> 2.2.16
    * [new tag] 2.2.17 -> 2.2.17
    * [new tag] 2.2.2 -> 2.2.2
    * [new tag] 2.2.3 -> 2.2.3
    * [new tag] 2.2.4 -> 2.2.4
    * [new tag] 2.2.5 -> 2.2.5
    * [new tag] 2.2.6 -> 2.2.6
    * [new tag] 2.2.7 -> 2.2.7
    * [new tag] 2.2.8 -> 2.2.8
    * [new tag] 2.2.9 -> 2.2.9
    * [new tag] 2.3.0 -> 2.3.0
    * [new tag] 2.4.0 -> 2.4.0
    * [new tag] 2.4.1 -> 2.4.1
    * [new tag] 2.4.10 -> 2.4.10
    * [new tag] 2.4.11 -> 2.4.11
    * [new tag] 2.4.12 -> 2.4.12
    * [new tag] 2.4.13 -> 2.4.13
    * [new tag] 2.4.14 -> 2.4.14
    * [new tag] 2.4.15 -> 2.4.15
    * [new tag] 2.4.16 -> 2.4.16
    * [new tag] 2.4.2 -> 2.4.2
    * [new tag] 2.4.3 -> 2.4.3
    * [new tag] 2.4.4 -> 2.4.4
    * [new tag] 2.4.5 -> 2.4.5
    * [new tag] 2.4.6 -> 2.4.6
    * [new tag] 2.4.7 -> 2.4.7
    * [new tag] 2.4.8 -> 2.4.8
    * [new tag] 2.4.9 -> 2.4.9
    * [new tag] 2.5.0 -> 2.5.0
    * [new tag] 2.5.1 -> 2.5.1
    * [new tag] 2.5.10 -> 2.5.10
    * [new tag] 2.5.11 -> 2.5.11
    * [new tag] 2.5.12 -> 2.5.12
    * [new tag] 2.5.2 -> 2.5.2
    * [new tag] 2.5.3 -> 2.5.3
    * [new tag] 2.5.4 -> 2.5.4
    * [new tag] 2.5.5 -> 2.5.5
    * [new tag] 2.5.6 -> 2.5.6
    * [new tag] 2.5.7 -> 2.5.7
    * [new tag] 2.5.8 -> 2.5.8
    * [new tag] 2.5.9 -> 2.5.9
    * [new tag] 2.6.0 -> 2.6.0
    * [new tag] 2.6.1 -> 2.6.1
    * [new tag] 2.6.2 -> 2.6.2
    * [new tag] 2.7.0 -> 2.7.0
    * [new tag] 2.7.1 -> 2.7.1
    * [new tag] 2.7.2 -> 2.7.2
    * [new tag] 2.7.3 -> 2.7.3
    * [new tag] 2.7.4 -> 2.7.4
    * [new tag] 2.7.5 -> 2.7.5
    * [new tag] 2.7.6 -> 2.7.6
    * [new tag] 2.7.7 -> 2.7.7
    * [new tag] 3.0.0 -> 3.0.0
    * [new tag] 3.0.1 -> 3.0.1
    * [new tag] 3.0.10 -> 3.0.10
    * [new tag] 3.0.11 -> 3.0.11
    * [new tag] 3.0.2 -> 3.0.2
    * [new tag] 3.0.3 -> 3.0.3
    * [new tag] 3.0.4 -> 3.0.4
    * [new tag] 3.0.5 -> 3.0.5
    * [new tag] 3.0.6 -> 3.0.6
    * [new tag] 3.0.7 -> 3.0.7
    * [new tag] 3.0.8 -> 3.0.8
    * [new tag] 3.0.9 -> 3.0.9
    * [new tag] 3.1.0 -> 3.1.0
    * [new tag] 3.1.1 -> 3.1.1
    * [new tag] 3.1.10 -> 3.1.10
    * [new tag] 3.1.11 -> 3.1.11
    * [new tag] 3.1.12 -> 3.1.12
    * [new tag] 3.1.2 -> 3.1.2
    * [new tag] 3.1.3 -> 3.1.3
    * [new tag] 3.1.4 -> 3.1.4
    * [new tag] 3.1.5 -> 3.1.5
    * [new tag] 3.1.6 -> 3.1.6
    * [new tag] 3.1.7 -> 3.1.7
    * [new tag] 3.1.8 -> 3.1.8
    * [new tag] 3.1.9 -> 3.1.9
    * [new tag] 3.2.0 -> 3.2.0
    * [new tag] 3.2.1 -> 3.2.1
    * [new tag] 3.2.10 -> 3.2.10
    * [new tag] 3.2.11 -> 3.2.11
    * [new tag] 3.2.12 -> 3.2.12
    * [new tag] 3.2.13 -> 3.2.13
    * [new tag] 3.2.14 -> 3.2.14
    * [new tag] 3.2.15 -> 3.2.15
    * [new tag] 3.2.16 -> 3.2.16
    * [new tag] 3.2.17 -> 3.2.17
    * [new tag] 3.2.2 -> 3.2.2
    * [new tag] 3.2.3 -> 3.2.3
    * [new tag] 3.2.4 -> 3.2.4
    * [new tag] 3.2.5 -> 3.2.5
    * [new tag] 3.2.6 -> 3.2.6
    * [new tag] 3.2.7 -> 3.2.7
    * [new tag] 3.2.8 -> 3.2.8
    * [new tag] 3.2.9 -> 3.2.9
    * [new tag] 3.3.0 -> 3.3.0
    * [new tag] 3.3.1 -> 3.3.1
    * [new tag] 3.3.10 -> 3.3.10
    * [new tag] 3.3.11 -> 3.3.11
    * [new tag] 3.3.12 -> 3.3.12
    * [new tag] 3.3.13 -> 3.3.13
    * [new tag] 3.3.14 -> 3.3.14
    * [new tag] 3.3.15 -> 3.3.15
    * [new tag] 3.3.16 -> 3.3.16
    * [new tag] 3.3.2 -> 3.3.2
    * [new tag] 3.3.3 -> 3.3.3
    * [new tag] 3.3.4 -> 3.3.4
    * [new tag] 3.3.5 -> 3.3.5
    * [new tag] 3.3.6 -> 3.3.6
    * [new tag] 3.3.7 -> 3.3.7
    * [new tag] 3.3.8 -> 3.3.8
    * [new tag] 3.3.9 -> 3.3.9
    * [new tag] 3.4.0 -> 3.4.0
    * [new tag] 3.4.1 -> 3.4.1
    * [new tag] 3.4.10 -> 3.4.10
    * [new tag] 3.4.11 -> 3.4.11
    * [new tag] 3.4.2 -> 3.4.2
    * [new tag] 3.4.3 -> 3.4.3
    * [new tag] 3.4.4 -> 3.4.4
    * [new tag] 3.4.5 -> 3.4.5
    * [new tag] 3.4.6 -> 3.4.6
    * [new tag] 3.4.7 -> 3.4.7
    * [new tag] 3.4.8 -> 3.4.8
    * [new tag] 3.4.9 -> 3.4.9
    * [new tag] 3.5.0 -> 3.5.0
    * [new tag] 3.5.1 -> 3.5.1
    * [new tag] 3.5.10 -> 3.5.10
    * [new tag] 3.5.2 -> 3.5.2
    * [new tag] 3.5.3 -> 3.5.3
    * [new tag] 3.5.4 -> 3.5.4
    * [new tag] 3.5.5 -> 3.5.5
    * [new tag] 3.5.6 -> 3.5.6
    * [new tag] 3.5.7 -> 3.5.7
    * [new tag] 3.5.8 -> 3.5.8
    * [new tag] 3.5.9 -> 3.5.9
    * [new tag] 3.6.0 -> 3.6.0
    * [new tag] 3.6.1 -> 3.6.1
    * [new tag] 3.6.10 -> 3.6.10
    * [new tag] 3.6.11 -> 3.6.11
    * [new tag] 3.6.12 -> 3.6.12
    * [new tag] 3.6.13 -> 3.6.13
    * [new tag] 3.6.14 -> 3.6.14
    * [new tag] 3.6.15 -> 3.6.15
    * [new tag] 3.6.16 -> 3.6.16
    * [new tag] 3.6.17 -> 3.6.17
    * [new tag] 3.6.18 -> 3.6.18
    * [new tag] 3.6.19 -> 3.6.19
    * [new tag] 3.6.2 -> 3.6.2
    * [new tag] 3.6.20 -> 3.6.20
    * [new tag] 3.6.21 -> 3.6.21
    * [new tag] 3.6.3 -> 3.6.3
    * [new tag] 3.6.4 -> 3.6.4
    * [new tag] 3.6.5 -> 3.6.5
    * [new tag] 3.6.6 -> 3.6.6
    * [new tag] 3.6.7 -> 3.6.7
    * [new tag] 3.6.8 -> 3.6.8
    * [new tag] 3.6.9 -> 3.6.9
    * [new tag] 4.0.0 -> 4.0.0
    * [new tag] 4.0.1 -> 4.0.1
    * [new tag] 4.0.10 -> 4.0.10
    * [new tag] 4.0.11 -> 4.0.11
    * [new tag] 4.0.12 -> 4.0.12
    * [new tag] 4.0.13 -> 4.0.13
    * [new tag] 4.0.14 -> 4.0.14
    * [new tag] 4.0.15 -> 4.0.15
    * [new tag] 4.0.16 -> 4.0.16
    * [new tag] 4.0.17 -> 4.0.17
    * [new tag] 4.0.18 -> 4.0.18
    * [new tag] 4.0.19 -> 4.0.19
    * [new tag] 4.0.2 -> 4.0.2
    * [new tag] 4.0.20 -> 4.0.20
    * [new tag] 4.0.21 -> 4.0.21
    * [new tag] 4.0.22 -> 4.0.22
    * [new tag] 4.0.23 -> 4.0.23
    * [new tag] 4.0.24 -> 4.0.24
    * [new tag] 4.0.25 -> 4.0.25
    * [new tag] 4.0.26 -> 4.0.26
    * [new tag] 4.0.27 -> 4.0.27
    * [new tag] 4.0.28 -> 4.0.28
    * [new tag] 4.0.3 -> 4.0.3
    * [new tag] 4.0.4 -> 4.0.4
    * [new tag] 4.0.5 -> 4.0.5
    * [new tag] 4.0.6 -> 4.0.6
    * [new tag] 4.0.7 -> 4.0.7
    * [new tag] 4.0.8 -> 4.0.8
    * [new tag] 4.0.9 -> 4.0.9
    * [new tag] 4.1.0 -> 4.1.0
    * [new tag] 4.1.1 -> 4.1.1
    * [new tag] 4.1.10 -> 4.1.10
    * [new tag] 4.1.11 -> 4.1.11
    * [new tag] 4.1.12 -> 4.1.12
    * [new tag] 4.1.13 -> 4.1.13
    * [new tag] 4.1.14 -> 4.1.14
    * [new tag] 4.1.15 -> 4.1.15
    * [new tag] 4.1.16 -> 4.1.16
    * [new tag] 4.1.17 -> 4.1.17
    * [new tag] 4.1.18 -> 4.1.18
    * [new tag] 4.1.19 -> 4.1.19
    * [new tag] 4.1.2 -> 4.1.2
    * [new tag] 4.1.20 -> 4.1.20
    * [new tag] 4.1.21 -> 4.1.21
    * [new tag] 4.1.22 -> 4.1.22
    * [new tag] 4.1.23 -> 4.1.23
    * [new tag] 4.1.24 -> 4.1.24
    * [new tag] 4.1.25 -> 4.1.25
    * [new tag] 4.1.3 -> 4.1.3
    * [new tag] 4.1.4 -> 4.1.4
    * [new tag] 4.1.5 -> 4.1.5
    * [new tag] 4.1.6 -> 4.1.6
    * [new tag] 4.1.7 -> 4.1.7
    * [new tag] 4.1.8 -> 4.1.8
    * [new tag] 4.2.0 -> 4.2.0
    * [new tag] 4.2.1 -> 4.2.1
    * [new tag] 4.2.10 -> 4.2.10
    * [new tag] 4.2.11 -> 4.2.11
    * [new tag] 4.2.12 -> 4.2.12
    * [new tag] 4.2.13 -> 4.2.13
    * [new tag] 4.2.2 -> 4.2.2
    * [new tag] 4.2.3 -> 4.2.3
    * [new tag] 4.2.4 -> 4.2.4
    * [new tag] 4.2.5 -> 4.2.5
    * [new tag] 4.2.6 -> 4.2.6
    * [new tag] 4.2.7 -> 4.2.7
    * [new tag] 4.2.8 -> 4.2.8
    * [new tag] 4.2.9 -> 4.2.9
    remote: Enumerating objects: 18, done.
    remote: Counting objects: 100% (11/11), done.
    remote: Total 18 (delta 11), reused 11 (delta 11), pack-reused 7
    Unpacking objects: 100% (18/18), 3.38 KiB | 216.00 KiB/s, done.
    From https://github.com/Homebrew/brew
    * [new tag] 4.0.29 -> 4.0.29
    * [new tag] 4.1.9 -> 4.1.9
    Switched to a new branch 'stable'
    ==> Updating Homebrew...
    ==> Downloading https://ghcr.io/v2/homebrew/portable-ruby/portable-ruby/blobs/sha256:02180ca8b8295422ae84921bcf034b7ee8ce5575488bd5e6a37a192e53cd5d34
    ######################################################################### 100.0%
    ==> Pouring portable-ruby-3.1.4.el_capitan.bottle.tar.gz
    ==> Installation successful!

    ==> Homebrew has enabled anonymous aggregate formulae and cask analytics.
    /bin/bash: -c: line 989: unexpected EOF while looking for matching `)'
    /bin/bash: -c: line 994: syntax error: unexpected end of file
  • 2、查看版本,命令如下

    1
    brew -v
  • 终端输出如下
    1
    Homebrew 4.2.13

仅供参考

基于 Hexo 搭建个人博客

官网:https://hexo.io/zh-cn/

  • 一、前置条件:注册、配置 Github

    • 1、注册
    • 2、创建名为 xxx.github.io 的仓库,xxx 是你的用户名
    • 3、配置 SSH-Key
      • 创建 SSH-Key,ssh-keygen -t rsa -C "xxx@xxx.com"xxx@xxx.com 是你的邮箱
      • 查看 id_rsa.pub,cat ~/.ssh/id_rsa.pub,复制
      • Settings - SSH and GPG keys - New SSH key,填写 Title,粘贴 Key
  • 二、安装依赖:Node、Hexo

    • 1、安装 Node
      • brew install node
    • 2、安装 Hexo
      • npm install hexo-cli -g
  • 三、配置博客:编写、部署

    • 1、初始化 hexo init xxx,````xxx`` 是你的文件名
    • 2、进入道你的文件夹下 cd xxx,安装依赖 npm install
    • 3、生成静态页面 hexo generate
    • 4、预览 hexo server
    • 5、编写博客 hexo new 'xxx'xxx 是你的文章名
      • PS:推荐 MacDown https://macdown.uranusjr.com/

      • 编辑 xxx/source/_posts/xxx.md 文件

        1
        2
        3
        4
        5
        6
        7
        8
        9
        title: "Hello Blog"
        date: 2021-03-05 12:30:00
        categories:
        - 记事本
        tags:
        - 日记
        ---

        其他内容...
    • 6、新建页面 hexo new page 'about',然后编辑 source/about/index.md 文件
    • 7、主题配置
      • 当前最新版本 hexo 中,默认主题 themes/landscape 未配置,需手动下载

      • 克隆主题仓库 git clone --depth 1 https://github.com/hexojs/hexo-theme-landscape themes/landscape

      • 复制 landscapexxx/themes

      • 编辑 xxx/themes/landscape/_config.yml 文件,修改 menu 配置

        1
        2
        3
        4
        menu:
        首页: /
        归档: /archives
        关于: /about
      • 若页面加载过慢,可将 xxx/themes/landscape/layout/_partial/head.ejs 文件中 <%- css('https://cdn.jsdelivr.net/npm/fork-awesome@1.2.0/css/fork-awesome.min.css') %> 注释

    • 8、部署
      • 编辑 xxx/_config.yml 文件,repository 填写你仓库的 SSH 地址

        1
        2
        3
        4
        deploy:
        type: 'git'
        repository: git@github.com:xxx/xxx.github.io.git
        branch: master
      • 执行 npm install hexo-deployer-git --save

      • 执行 hexo deploy,部署完成后,即可通过 xxx.github.io 访问

  • 四、相关命令

    • 1、常用命令

      1
      2
      3
      4
      5
      6
      7
      hexo new 'postName'       #新建文章
      hexo new page 'pageName' #新建页面
      hexo generate #生成静态页面至public目录
      hexo server #开启预览访问端口(默认端口4000,'ctrl + c'关闭 server )
      hexo deploy #将.deploy 目录部署到 GitHubhexo
      hexo help #查看帮助
      hexo version #查看 Hexo 的版本
    • 2、复合命令

      1
      2
      hexo deploy -g  #生成加部署
      hexo server -g #生成加预览
    • 3、简写

      1
      2
      3
      4
      hexo n  # hexo new
      hexo g # hexo generate
      hexo s # hexo server
      hexo d # hexo deploy