更新Cocoapods 遇到 activesupport requires Ruby version >= 2.2.2 问题.

在自己的电脑上安装cocoapods的时候遇见以下问题,以前从来没见过

Password:
Fetching: nap-1.1.0.gem (100%)
Successfully installed nap-1.1.0
Fetching: fourflusher-0.3.2.gem (100%)
Successfully installed fourflusher-0.3.2
Fetching: escape-0.0.4.gem (100%)
Successfully installed escape-0.0.4
Fetching: colored-1.2.gem (100%)
Successfully installed colored-1.2
Fetching: concurrent-ruby-1.0.2.gem (100%)
Successfully installed concurrent-ruby-1.0.2
Fetching: minitest-5.9.0.gem (100%)
Successfully installed minitest-5.9.0
Fetching: thread_safe-0.3.5.gem (100%)
Successfully installed thread_safe-0.3.5
Fetching: tzinfo-1.2.2.gem (100%)
Successfully installed tzinfo-1.2.2
Fetching: i18n-0.7.0.gem (100%)
Successfully installed i18n-0.7.0
Fetching: activesupport-5.0.0.1.gem (100%)
ERROR:  Error installing cocoapods:
    activesupport requires Ruby version >= 2.2.2.'```

在网络上查询了以后 说是ruby 版本问题太低了就去尝试更新最新的的ruby,但是在电脑上安装最新的ruby 2.3.0 的时候安装不上遇到以下问题

Searching for binary rubies, this might take some time.
No binary rubies available for: osx/10.11/x86_64/ruby-2.3.0.
Continuing with compilation. Please read 'rvm help mount' to get more information on binary rubies.
Checking requirements for osx.
Certificates in '/usr/local/etc/openssl/cert.pem' are already up to date.
Requirements installation successful.
Installing Ruby from source to: /Users/Steven/.rvm/rubies/ruby-2.3.0, this may take a while depending on your cpu(s)...
ruby-2.3.0 - #downloading ruby-2.3.0, this may take a while depending on your connection...
** Resuming transfer from byte position 2711552
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 10.9M 100 10.9M 0 0 9048 0 0:21:08 0:21:08 --:--:-- 31509
ruby-2.3.0 - #extracting ruby-2.3.0 to /Users/Steven/.rvm/src/ruby-2.3.0....
ruby-2.3.0 - #configuring......................................................|
ruby-2.3.0 - #post-configuration.
ruby-2.3.0 - #compiling...........
Error running '__rvm_make -j 1',
showing last 15 lines of /Users/Steven/.rvm/log/1476157311_ruby-2.3.0/make.log
compiling ./missing/explicit_bzero.c
compiling ./missing/setproctitle.c
compiling dmyenc.c
linking miniruby
config.status: creating ruby-runner.c
dyld: lazy symbol binding failed: Symbol not found: _clock_gettime
Referenced from: /Users/Steven/.rvm/src/ruby-2.3.0/./miniruby (which was built for Mac OS X 10.12)
Expected in: /usr/lib/libSystem.B.dylib

dyld: Symbol not found: _clock_gettime
Referenced from: /Users/Steven/.rvm/src/ruby-2.3.0/./miniruby (which was built for Mac OS X 10.12)
Expected in: /usr/lib/libSystem.B.dylib

make: *** [.rbconfig.time] Trace/BPT trap: 5
++ return 2
There has been an error while running make. Halting the installation.```

有两个错误,在这里我要提醒各位不要去找这个错误的原因,因为我在这个坑里爬了很久都没爬出来我一直在找这个ruby无法更新的问题最后在StackFlower 上看见作者说是一个bug 没法找到长时间维护此项目的coder所以没有解决这个问题,所以这个问题我个人认为是还没法解决的。我在stackflower 上找到今天凌晨3点都没有找到这个问题的解决方案。

之后我转换思路,从解决 activesupport requires Ruby version >= 2.2.2.' 这个问题入手 我把Xcode 卸载了 重新装了一遍 在stack flower 找到的这句神奇的代码
sudo gem install activesupport -v 4.2.6

就没有问题了 我 没有更新 ruby 还是用的 2.0.0 系统的

之后运行 sudo gem install cocoa pods

瞬间让你G点的时刻就来了

StevendeMacBook-Pro:~ Steven$ sudo gem install cocoapods
Fetching: claide-1.0.0.gem (100%)
Successfully installed claide-1.0.0
Fetching: xcodeproj-1.3.0.gem (100%)
Successfully installed xcodeproj-1.3.0
Fetching: molinillo-0.4.5.gem (100%)
Successfully installed molinillo-0.4.5
Fetching: cocoapods-try-1.1.0.gem (100%)
Successfully installed cocoapods-try-1.1.0
Fetching: netrc-0.7.8.gem (100%)
Successfully installed netrc-0.7.8
Fetching: cocoapods-trunk-1.0.0.gem (100%)
Successfully installed cocoapods-trunk-1.0.0
Fetching: cocoapods-stats-1.0.0.gem (100%)
Successfully installed cocoapods-stats-1.0.0
Fetching: cocoapods-search-1.0.0.gem (100%)
Successfully installed cocoapods-search-1.0.0
Fetching: cocoapods-plugins-1.0.0.gem (100%)
Successfully installed cocoapods-plugins-1.0.0
Fetching: cocoapods-downloader-1.1.1.gem (100%)
Successfully installed cocoapods-downloader-1.1.1
Fetching: cocoapods-deintegrate-1.0.1.gem (100%)
Successfully installed cocoapods-deintegrate-1.0.1
Fetching: fuzzy_match-2.0.4.gem (100%)
Successfully installed fuzzy_match-2.0.4
Fetching: cocoapods-core-1.0.1.gem (100%)
Successfully installed cocoapods-core-1.0.1
Fetching: cocoapods-1.0.1.gem (100%)
Successfully installed cocoapods-1.0.1
Parsing documentation for claide-1.0.0
Installing ri documentation for claide-1.0.0
Parsing documentation for xcodeproj-1.3.0
Installing ri documentation for xcodeproj-1.3.0
Parsing documentation for molinillo-0.4.5
Installing ri documentation for molinillo-0.4.5
Parsing documentation for cocoapods-try-1.1.0
Installing ri documentation for cocoapods-try-1.1.0
Parsing documentation for netrc-0.7.8
Installing ri documentation for netrc-0.7.8
Parsing documentation for cocoapods-trunk-1.0.0
Installing ri documentation for cocoapods-trunk-1.0.0
Parsing documentation for cocoapods-stats-1.0.0
Installing ri documentation for cocoapods-stats-1.0.0
Parsing documentation for cocoapods-search-1.0.0
Installing ri documentation for cocoapods-search-1.0.0
Parsing documentation for cocoapods-plugins-1.0.0
Installing ri documentation for cocoapods-plugins-1.0.0
Parsing documentation for cocoapods-downloader-1.1.1
Installing ri documentation for cocoapods-downloader-1.1.1
Parsing documentation for cocoapods-deintegrate-1.0.1
Installing ri documentation for cocoapods-deintegrate-1.0.1
Parsing documentation for fuzzy_match-2.0.4
Installing ri documentation for fuzzy_match-2.0.4
Parsing documentation for cocoapods-core-1.0.1
Installing ri documentation for cocoapods-core-1.0.1
Parsing documentation for cocoapods-1.0.1
Installing ri documentation for cocoapods-1.0.1
14 gems installed

之后 持续 高潮

StevendeMacBook-Pro:~ Steven$ pod setup
Setting up CocoaPods master repo
  $ /usr/bin/git pull --ff-only
  From https://github.com/CocoaPods/Specs
     a05e8fc..49a15c7  master     -> origin/master
  Updating a05e8fc..49a15c7
  Fast-forward
   Specs/Cerfing/2.0.4/Cerfing.podspec.json           | 42 +++++++++++++++++++
   Specs/CivicSDK/0.1.2/CivicSDK.podspec.json         | 27 ++++++++++++
   Specs/CivicSDK/0.1.21/CivicSDK.podspec.json        | 27 ++++++++++++
   .../1.0.2/CodeCoverageForXcode8GM.podspec.json     | 22 ++++++++++
   Specs/CoreDragon/0.1.3/CoreDragon.podspec.json     | 40 ++++++++++++++++++
   Specs/DHAnimation/0.1.0/DHAnimation.podspec.json   | 22 ++++++++++
   Specs/DUMessaging/2.0.1/DUMessaging.podspec.json   | 37 +++++++++++++++++
   Specs/EzHTTP/3.0.9/EzHTTP.podspec.json             | 23 +++++++++++
   .../EzImageLoader/3.0.5/EzImageLoader.podspec.json | 32 +++++++++++++++
   .../0.0.3/FEPopupMenuController.podspec.json       | 27 ++++++++++++
   Specs/HanekeObjc/0.13.0/HanekeObjc.podspec.json    | 25 +++++++++++
   .../0.2.1/InAppTranslation.podspec.json            | 21 ++++++++++
   .../0.2.2/InAppTranslation.podspec.json            | 21 ++++++++++
   .../1.0.7/JCNavigationController.podspec.json      | 24 +++++++++++
   .../JRBaseRequest/1.0.1/JRBaseRequest.podspec.json | 22 ++++++++++
   .../JRBaseRequest/1.0.2/JRBaseRequest.podspec.json | 22 ++++++++++
   Specs/LSNetworking/0.2.5/LSNetworking.podspec.json | 22 ++++++++++
   .../LSProgressHUD/0.2.1/LSProgressHUD.podspec.json | 35 ++++++++++++++++
   .../0.2.0/OptionalEquatable.podspec.json           | 23 +++++++++++
   .../0.14.0/ReactiveCache.podspec.json              | 28 +++++++++++++
   Specs/SJUtils/0.0.3/SJUtils.podspec.json           | 26 ++++++++++++
   Specs/SJUtils/0.0.4/SJUtils.podspec.json           | 29 +++++++++++++
   .../0.3.2/SWCardViewController.podspec.json        | 22 ++++++++++
   Specs/SenStickSDK/0.9.0/SenStickSDK.podspec.json   | 28 +++++++++++++
   Specs/SenStickSDK/0.9.1/SenStickSDK.podspec.json   | 28 +++++++++++++
   .../1.6.18/SensorsAnalyticsSDK.podspec.json        | 37 +++++++++++++++++
   .../TTFloatButton/0.1.2/TTFloatButton.podspec.json | 22 ++++++++++
   Specs/TTLog/0.1.4/TTLog.podspec.json               | 22 ++++++++++
   Specs/XLsn0w/5.0.0/XLsn0w.podspec.json             | 48 ++++++++++++++++++++++
   29 files changed, 804 insertions(+)
   create mode 100644 Specs/Cerfing/2.0.4/Cerfing.podspec.json
   create mode 100644 Specs/CivicSDK/0.1.2/CivicSDK.podspec.json
   create mode 100644 Specs/CivicSDK/0.1.21/CivicSDK.podspec.json
   create mode 100644 Specs/CodeCoverageForXcode8GM/1.0.2/CodeCoverageForXcode8GM.podspec.json
   create mode 100644 Specs/CoreDragon/0.1.3/CoreDragon.podspec.json
   create mode 100644 Specs/DHAnimation/0.1.0/DHAnimation.podspec.json
   create mode 100644 Specs/DUMessaging/2.0.1/DUMessaging.podspec.json
   create mode 100644 Specs/EzHTTP/3.0.9/EzHTTP.podspec.json
   create mode 100644 Specs/EzImageLoader/3.0.5/EzImageLoader.podspec.json
   create mode 100644 Specs/FEPopupMenuController/0.0.3/FEPopupMenuController.podspec.json
   create mode 100644 Specs/HanekeObjc/0.13.0/HanekeObjc.podspec.json
   create mode 100644 Specs/InAppTranslation/0.2.1/InAppTranslation.podspec.json
   create mode 100644 Specs/InAppTranslation/0.2.2/InAppTranslation.podspec.json
   create mode 100644 Specs/JCNavigationController/1.0.7/JCNavigationController.podspec.json
   create mode 100644 Specs/JRBaseRequest/1.0.1/JRBaseRequest.podspec.json
   create mode 100644 Specs/JRBaseRequest/1.0.2/JRBaseRequest.podspec.json
   create mode 100644 Specs/LSNetworking/0.2.5/LSNetworking.podspec.json
   create mode 100644 Specs/LSProgressHUD/0.2.1/LSProgressHUD.podspec.json
   create mode 100644 Specs/OptionalEquatable/0.2.0/OptionalEquatable.podspec.json
   create mode 100644 Specs/ReactiveCache/0.14.0/ReactiveCache.podspec.json
   create mode 100644 Specs/SJUtils/0.0.3/SJUtils.podspec.json
   create mode 100644 Specs/SJUtils/0.0.4/SJUtils.podspec.json
   create mode 100644 Specs/SWCardViewController/0.3.2/SWCardViewController.podspec.json
   create mode 100644 Specs/SenStickSDK/0.9.0/SenStickSDK.podspec.json
   create mode 100644 Specs/SenStickSDK/0.9.1/SenStickSDK.podspec.json
   create mode 100644 Specs/SensorsAnalyticsSDK/1.6.18/SensorsAnalyticsSDK.podspec.json
   create mode 100644 Specs/TTFloatButton/0.1.2/TTFloatButton.podspec.json
   create mode 100644 Specs/TTLog/0.1.4/TTLog.podspec.json
   create mode 100644 Specs/XLsn0w/5.0.0/XLsn0w.podspec.json

CocoaPods 1.1.0.rc.2 is available.
To update use: `sudo gem install cocoapods --pre`
[!] This is a test version we'd love you to try.

For more information, see https://blog.cocoapods.org and the CHANGELOG for this version at https://github.com/CocoaPods/CocoaPods/releases/tag/1.1.0.rc.2

Setup completed

大家遇见这个问题以后 千万不要去踩到 ruby 的版本更新的 问题里面去 因为这个问题解决不了 还浪费时间。
不行的话就卸载Xcode 然后按照 以上方法重新再来一次

最后编辑于
©著作权归作者所有,转载或内容合作请联系作者
  • 序言:七十年代末,一起剥皮案震惊了整个滨河市,随后出现的几起案子,更是在滨河造成了极大的恐慌,老刑警刘岩,带你破解...
    沈念sama阅读 214,444评论 6 496
  • 序言:滨河连续发生了三起死亡事件,死亡现场离奇诡异,居然都是意外死亡,警方通过查阅死者的电脑和手机,发现死者居然都...
    沈念sama阅读 91,421评论 3 389
  • 文/潘晓璐 我一进店门,熙熙楼的掌柜王于贵愁眉苦脸地迎上来,“玉大人,你说我怎么就摊上这事。” “怎么了?”我有些...
    开封第一讲书人阅读 160,036评论 0 349
  • 文/不坏的土叔 我叫张陵,是天一观的道长。 经常有香客问我,道长,这世上最难降的妖魔是什么? 我笑而不...
    开封第一讲书人阅读 57,363评论 1 288
  • 正文 为了忘掉前任,我火速办了婚礼,结果婚礼上,老公的妹妹穿的比我还像新娘。我一直安慰自己,他们只是感情好,可当我...
    茶点故事阅读 66,460评论 6 386
  • 文/花漫 我一把揭开白布。 她就那样静静地躺着,像睡着了一般。 火红的嫁衣衬着肌肤如雪。 梳的纹丝不乱的头发上,一...
    开封第一讲书人阅读 50,502评论 1 292
  • 那天,我揣着相机与录音,去河边找鬼。 笑死,一个胖子当着我的面吹牛,可吹牛的内容都是我干的。 我是一名探鬼主播,决...
    沈念sama阅读 39,511评论 3 412
  • 文/苍兰香墨 我猛地睁开眼,长吁一口气:“原来是场噩梦啊……” “哼!你这毒妇竟也来了?” 一声冷哼从身侧响起,我...
    开封第一讲书人阅读 38,280评论 0 270
  • 序言:老挝万荣一对情侣失踪,失踪者是张志新(化名)和其女友刘颖,没想到半个月后,有当地人在树林里发现了一具尸体,经...
    沈念sama阅读 44,736评论 1 307
  • 正文 独居荒郊野岭守林人离奇死亡,尸身上长有42处带血的脓包…… 初始之章·张勋 以下内容为张勋视角 年9月15日...
    茶点故事阅读 37,014评论 2 328
  • 正文 我和宋清朗相恋三年,在试婚纱的时候发现自己被绿了。 大学时的朋友给我发了我未婚夫和他白月光在一起吃饭的照片。...
    茶点故事阅读 39,190评论 1 342
  • 序言:一个原本活蹦乱跳的男人离奇死亡,死状恐怖,灵堂内的尸体忽然破棺而出,到底是诈尸还是另有隐情,我是刑警宁泽,带...
    沈念sama阅读 34,848评论 5 338
  • 正文 年R本政府宣布,位于F岛的核电站,受9级特大地震影响,放射性物质发生泄漏。R本人自食恶果不足惜,却给世界环境...
    茶点故事阅读 40,531评论 3 322
  • 文/蒙蒙 一、第九天 我趴在偏房一处隐蔽的房顶上张望。 院中可真热闹,春花似锦、人声如沸。这庄子的主人今日做“春日...
    开封第一讲书人阅读 31,159评论 0 21
  • 文/苍兰香墨 我抬头看了看天上的太阳。三九已至,却和暖如春,着一层夹袄步出监牢的瞬间,已是汗流浃背。 一阵脚步声响...
    开封第一讲书人阅读 32,411评论 1 268
  • 我被黑心中介骗来泰国打工, 没想到刚下飞机就差点儿被人妖公主榨干…… 1. 我叫王不留,地道东北人。 一个月前我还...
    沈念sama阅读 47,067评论 2 365
  • 正文 我出身青楼,却偏偏与公主长得像,于是被迫代替她去往敌国和亲。 传闻我的和亲对象是个残疾皇子,可洞房花烛夜当晚...
    茶点故事阅读 44,078评论 2 352

推荐阅读更多精彩内容