ruby(gen)加速
之前由于项目需要,所以搞过一阵子TDD,主要是cucumber(后续将在【解锁j】专栏介绍一下cucumber),它使用了ruby,因此研究了一段时间,顺便也讲一下gen的加速。
Ruby 的默认源使用的是 https://rubygems.org,国内访问这个网址有时候会有问题。
- 查看当前你用的源
(base) frank@deepin:/etc$ gem source -l
*** CURRENT SOURCES ***
https://rubygems.org/
- 添加国内源
(base) frank@deepin:/etc$ gem sources --add https://gems.ruby-china.com
https://gems.ruby-china.com added to sources
(base) frank@deepin:/etc$ gem source -l
*** CURRENT SOURCES ***
https://rubygems.org/
https://gems.ruby-china.com
- 删除原来的源
(base) frank@deepin:/etc$ gem source -r https://rubygems.org/
https://rubygems.org/ removed from sources
(base) frank@deepin:/etc$ gem source -l
*** CURRENT SOURCES ***
https://gems.ruby-china.com
网友评论