rvm install is slow to install. Use rubychina ruby mirror to solve

When a novice uses rvm to install rubies, it is often caused by rvm install to download and use foreign mirrors, which leads to slow download and difficult installation.

 

In the current situation, the ruby ​​source provided by rubychina can be used.

 

This mirror is the official mirror of Ruby China. The source is cache.ruby-lang.org, which is used to improve the speed of domestic Ruby installation. At the same time, this mirror is updated in real time, and there are 150 CDN nodes in the country to accelerate.

https://cache.ruby-china.org

Features

  • Mirror official Ruby files directly based on CDN, and store them in China for a long time;
  • Simple architecture, no tedious things such as manual or regular updates, can ensure 99.9% stability of the service (this depends on the stability of UpYun CDN);
  • No synchronization, no delay, you can get the new version of the official release instantly;
  • More than 150 CDN nodes nationwide, effectively guaranteeing access speed;
  • This mirror strictly uses SSL to synchronize the source to ensure security.

Quick Links to Common Ruby Versions

Browse all files

How to use - RVM

Execute directly, replacing the configuration information of RVM

$ echo "ruby_url=https://cache.ruby-china.org/pub/ruby" > ~/.rvm/user/db

Remember that RVM needs to be modified after each update. If you used ruby.taobao.org before, you can manually open ~/.rvm/config/db and modify it

Install Ruby

$ rvm install 2.3.0 --disable-binary # 忽略二进制,否则可能会请求 rubies.travis-ci.org

How to use - rbenv

$ git clone https://github.com/andorchen/rbenv-china-mirror.git ~/.rbenv/plugins/rbenv-china-mirror

How to use - ruby-build

$ export RUBY_BUILD_MIRROR_URL=https://cache.ruby-china.org 
$ ruby-build 2.3.3 /usr/local

common problem

curl: (60) SSL certificate problem, verify that the CA cert is OK

You can try to  sudo update-ca-certificates --fresh update your system's SSL certificate.

The installation below Ubuntu will download the binary files of rubies.travis-ci.org, can't use the mirror?

You can try to add after install  --disable-binary, for example rvm install 2.3.0 --disable-binary

Guess you like

Origin http://10.200.1.11:23101/article/api/json?id=327007400&siteId=291194637