配置ruby環境

首先是rubyinstaller    http://rubyinstaller.org/downloads/shell

有權限直接安裝的話,比較省事,不然要找一個壓縮包,手動安裝。
api

配置環境,例如:
sass

RUBY_HOME=C:\rubyruby

PATH=%RUBY_HOME%\bin服務器

RUBYOPT=-rubygemsui


而後是gemspa

例如:
.net

C:\Users>gem install sass
ERROR:  While executing gem ... (Gem::RemoteFetcher::FetchError)
    Errno::ETIMEDOUT: A connection attempt failed because the connected party di
d not properly respond after a period of time, or established connection failed
because connected host has failed to respond. - connect(2) for "rubygems.global.
ssl.fastly.net" port 443 (https://api.rubygems.org/quick/Marshal.4.8/sass-3.4.13.gemspec.rz)

淘寶的鏡像已經無人維護了,參考代理

https://ruby-china.org/topics/29250 code

https://gems.ruby-china.org/

使用新的鏡像

$ gem sources --add https://gems.ruby-china.org/ --remove https://rubygems.org/$ gem sources -l
*** CURRENT SOURCES ***

https://gems.ruby-china.org# 請確保只有 gems.ruby-china.org$ gem install rails



涉及到代理服務器的話,這麼搞:

>>SET http_proxy=>>SET https_proxy= 
>>gem install something
or
>>gem list -p http://user:pwd@ip_or_host:8080 -r
相關文章
相關標籤/搜索