gem install的时候半天没有响应
$ gem sources -l //查看 *** CURRENT SOURCES *** https://rubygems.org $ gem sources --add https://ruby.taobao.org/ --remove https://rubygems.org //--add 添加 --remove 删除 $ gem sources -l //查看 *** CURRENT SOURCES *** https://ruby.taobao.org/ //请确保只有 ruby.taobao.org
$ gem install rails
如果你使用Gemfils 和 Bundle
$ bundle config mirror.https://rubygems.org https://ruby.taobao.org
这样你不用改你的 Gemfile 的 source。
source 'https://rubygems.org/'
gem 'rails', '4.1.0'
...
本文介绍了一种解决在使用gem安装Ruby组件时速度过慢的方法。通过更换gem源到淘宝镜像,可以显著提高安装速度。同时,对于使用Gemfile和Bundler的项目,提供了配置方法来避免修改Gemfile中的源。
424

被折叠的 条评论
为什么被折叠?



