{"action":"opened","issue":{"url":"https://api.github.com/repos/confidence68/blog/issues/158","labels_url":"https://api.github.com/repos/confidence68/blog/issues/158/labels{/name}","comments_url":"https://api.github.com/repos/confidence68/blog/issues/158/comments","events_url":"https://api.github.com/repos/confidence68/blog/issues/158/events","html_url":"https://github.com/confidence68/blog/issues/158","id":92818362,"number":158,"title":"解决国内gem不能用的问题","user":{"login":"confidence68","id":3736355,"avatar_url":"https://avatars.githubusercontent.com/u/3736355?v=3","gravatar_id":"","url":"https://api.github.com/users/confidence68","html_url":"https://github.com/confidence68","followers_url":"https://api.github.com/users/confidence68/followers","following_url":"https://api.github.com/users/confidence68/following{/other_user}","gists_url":"https://api.github.com/users/confidence68/gists{/gist_id}","starred_url":"https://api.github.com/users/confidence68/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/confidence68/subscriptions","organizations_url":"https://api.github.com/users/confidence68/orgs","repos_url":"https://api.github.com/users/confidence68/repos","events_url":"https://api.github.com/users/confidence68/events{/privacy}","received_events_url":"https://api.github.com/users/confidence68/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-07-03T08:06:45Z","updated_at":"2015-07-03T08:06:45Z","closed_at":null,"body":"最近在安装SASS的时候，用到gem命令，但是运行出行如下错误！\r\n\r\n    C:\\Users\\len>gem install sass\r\n    ERROR:  While executing gem ... (Gem::RemoteFetcher::FetchError)\r\n        Errno::ETIMEDOUT: A connection attempt failed because the connected party di\r\n    d not properly respond after a period of time, or established connection failed\r\n    because connected host has failed to respond. - connect(2) for \"rubygems.global.\r\n    ssl.fastly.net\" port 443 (https://api.rubygems.org/quick/Marshal.4.8/sass-3.4.13\r\n    .gemspec.rz)\r\n\r\n<!--more-->\r\n\r\n\r\n原因是ruby 的gem被和谐了，现在淘宝的ruby工程师架设了rubygems的国内镜像。使用方法如下：\r\n\r\n    $ gem sources --remove https://rubygems.org/\r\n    $ gem sources -a https://ruby.taobao.org/\r\n    $ gem sources -l\r\n    *** CURRENT SOURCES ***\r\n    \r\n    https://ruby.taobao.org\r\n\r\n然后在运行gem命令就可以了！\r\n\r\n\r\n    C:\\Users\\len>gem install sass\r\n    Fetching: sass-3.4.13.gem (100%)\r\n    Successfully installed sass-3.4.13\r\n    Parsing documentation for sass-3.4.13\r\n    Installing ri documentation for sass-3.4.13\r\n    Done installing documentation for sass after 5 seconds\r\n    1 gem installed\r\n\r\n关于sass入门教程请看：http://www.haorooms.com/post/sass_css\r\n"}}