更新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 系統(tǒng)的

之后運行 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

之后 持續(xù) 高潮

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 然后按照 以上方法重新再來一次

最后編輯于
?著作權歸作者所有,轉載或內容合作請聯(lián)系作者
  • 序言:七十年代末导犹,一起剝皮案震驚了整個濱河市,隨后出現的幾起案子羡忘,更是在濱河造成了極大的恐慌谎痢,老刑警劉巖,帶你破解...
    沈念sama閱讀 222,946評論 6 518
  • 序言:濱河連續(xù)發(fā)生了三起死亡事件卷雕,死亡現場離奇詭異节猿,居然都是意外死亡,警方通過查閱死者的電腦和手機漫雕,發(fā)現死者居然都...
    沈念sama閱讀 95,336評論 3 399
  • 文/潘曉璐 我一進店門滨嘱,熙熙樓的掌柜王于貴愁眉苦臉地迎上來峰鄙,“玉大人,你說我怎么就攤上這事九孩∠裙荩” “怎么了?”我有些...
    開封第一講書人閱讀 169,716評論 0 364
  • 文/不壞的土叔 我叫張陵躺彬,是天一觀的道長。 經常有香客問我梅惯,道長宪拥,這世上最難降的妖魔是什么? 我笑而不...
    開封第一講書人閱讀 60,222評論 1 300
  • 正文 為了忘掉前任铣减,我火速辦了婚禮她君,結果婚禮上,老公的妹妹穿的比我還像新娘葫哗。我一直安慰自己缔刹,他們只是感情好,可當我...
    茶點故事閱讀 69,223評論 6 398
  • 文/花漫 我一把揭開白布劣针。 她就那樣靜靜地躺著校镐,像睡著了一般。 火紅的嫁衣襯著肌膚如雪捺典。 梳的紋絲不亂的頭發(fā)上鸟廓,一...
    開封第一講書人閱讀 52,807評論 1 314
  • 那天,我揣著相機與錄音襟己,去河邊找鬼引谜。 笑死,一個胖子當著我的面吹牛擎浴,可吹牛的內容都是我干的员咽。 我是一名探鬼主播,決...
    沈念sama閱讀 41,235評論 3 424
  • 文/蒼蘭香墨 我猛地睜開眼贮预,長吁一口氣:“原來是場噩夢啊……” “哼贝室!你這毒婦竟也來了?” 一聲冷哼從身側響起萌狂,我...
    開封第一講書人閱讀 40,189評論 0 277
  • 序言:老撾萬榮一對情侶失蹤档玻,失蹤者是張志新(化名)和其女友劉穎,沒想到半個月后茫藏,有當地人在樹林里發(fā)現了一具尸體误趴,經...
    沈念sama閱讀 46,712評論 1 320
  • 正文 獨居荒郊野嶺守林人離奇死亡,尸身上長有42處帶血的膿包…… 初始之章·張勛 以下內容為張勛視角 年9月15日...
    茶點故事閱讀 38,775評論 3 343
  • 正文 我和宋清朗相戀三年务傲,在試婚紗的時候發(fā)現自己被綠了凉当。 大學時的朋友給我發(fā)了我未婚夫和他白月光在一起吃飯的照片枣申。...
    茶點故事閱讀 40,926評論 1 353
  • 序言:一個原本活蹦亂跳的男人離奇死亡,死狀恐怖看杭,靈堂內的尸體忽然破棺而出忠藤,到底是詐尸還是另有隱情,我是刑警寧澤楼雹,帶...
    沈念sama閱讀 36,580評論 5 351
  • 正文 年R本政府宣布模孩,位于F島的核電站,受9級特大地震影響贮缅,放射性物質發(fā)生泄漏榨咐。R本人自食惡果不足惜,卻給世界環(huán)境...
    茶點故事閱讀 42,259評論 3 336
  • 文/蒙蒙 一谴供、第九天 我趴在偏房一處隱蔽的房頂上張望块茁。 院中可真熱鬧,春花似錦桂肌、人聲如沸数焊。這莊子的主人今日做“春日...
    開封第一講書人閱讀 32,750評論 0 25
  • 文/蒼蘭香墨 我抬頭看了看天上的太陽佩耳。三九已至,卻和暖如春照雁,著一層夾襖步出監(jiān)牢的瞬間蚕愤,已是汗流浹背。 一陣腳步聲響...
    開封第一講書人閱讀 33,867評論 1 274
  • 我被黑心中介騙來泰國打工饺蚊, 沒想到剛下飛機就差點兒被人妖公主榨干…… 1. 我叫王不留缅阳,地道東北人啦撮。 一個月前我還...
    沈念sama閱讀 49,368評論 3 379
  • 正文 我出身青樓蒜绽,卻偏偏與公主長得像舟肉,于是被迫代替她去往敵國和親。 傳聞我的和親對象是個殘疾皇子燕酷,可洞房花燭夜當晚...
    茶點故事閱讀 45,930評論 2 361

推薦閱讀更多精彩內容