rvm: command not found Mac 安裝cocoapods遇到error: RPC failed; curl 56 SSLRead() return error -36問題
最新更新:2016年7月25日,新電腦新系統測試安裝!
1、cocopods 安裝:http://www.cnblogs.com/surge/p/4436360.html 【注:可以直接從第二步開始安裝】 2、出現以下問題,大家不要慌:
1 boai:~ boai$ sudo gem install cocoapods 2 ERROR: Could not find a valid gem 'cocoapods' (>= 0), here is why: 3 Unable to download data from http://ruby.taobao.org/ - bad response Not Found 404 (http://ruby.taobao.org/specs.4.8.gz) 4 boai:~ boai$ sudo gem install cocoapods 5 ERROR: Could not find a valid gem 'cocoapods' (>= 0), here is why: 6 Unable to download data from http://ruby.taobao.org/ - bad response Not Found 404 (http://ruby.taobao.org/specs.4.8.gz) 7 boai:~ boai$ sudo gem update --system 8 ERROR: While executing gem ... (Gem::RemoteFetcher::FetchError) 9 bad response Not Found 404 (http://ruby.taobao.org/specs.4.8.gz)
解決辦法:
(1)先執行下面兩行程式碼:
1
2 sudo gem sources -a http://rubygems.org
(2)執行過程如下:
1 boai:~ boai$ sudo gem sources -r https://rubygems.org 2 source https://rubygems.org not present in cache 3 boai:~ boai$ sudo gem sources -a http://rubygems.org 4 https://rubygems.org is recommended for security over http://rubygems.org 5 6 Do you want to add this insecure source? [yn] y
最後會提示
Do you want to add this insecure source? [yn]
你選擇 y就行了
然後出現:
http://rubygems.org added to sources
這就說明成功了,就可以執行下面的安裝了。
在2016年7月1日開始,會出現以下錯誤,
rvm: command not found Mac
activesupport requires Ruby version >= 2.2.2.
這兩種錯誤的解決辦法如下;
強烈建議 使用rvm安裝ruby
1、安裝 RVM
RVM:Ruby Version Manager,Ruby版本管理器,包括Ruby的版本管理和Gem庫管理(gemset)
- $ curl -L get.rvm.io | bash -s stable
等待一段時間後就可以成功安裝好 RVM。
- $ source ~/.bashrc
- $ source ~/.bash_profile
測試是否安裝正常
rvm -v
2、用RVM升級Ruby- #檢視當前ruby版本
- $ ruby -v
- ruby 1.8.7
- #列出已知的ruby版本
- $ rvm list known
- #安裝ruby 2.3.0
-
boaideMacBook:~ boai$ rvm install 2.3.0
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 |
boaideMacBook:~ boai$ rvm install 2.3.0
Searching
for
binary rubies,
|