在使用 Jekyll 搭建博客时,由于其依赖是 Ruby,因此需要用到 bundle install 安装 Gemfile指定的依赖。此时,可能会出现长时间无响应的问题,其解决方案如下:
问题
使用bundle install 安装Gemfile中的依赖时,遇到长时间无响应的情况。
其原因为:访问国外镜像源https://rubygems.org速度较慢。
解决方案
此处使用 Gemfile和Bundler,可以用 Bundler 的 Gem 源代码镜像命令:1
$ bundle config mirror.https://rubygems.org https://gems.ruby-china.com
这样就不需要修改Gemfile中的source:1
2
3source 'https://rubygems.org/'
gem 'rails', '4.2.5'
...
详情请参考官方网站