请使用支持JavaScript的浏览器! RVM用中国镜像安装_ruby_michaelliu2000的博客-CSDN博客-蚂蚁淘商城
新闻动态

RVM用中国镜像安装_ruby_michaelliu2000的博客-CSDN博客

  
  2025-11-06
  

RVM使用中国镜像安装RVMRVM 安装

RVM

RVM 是一个命令行工具,可以提供一个便捷的多版本 Ruby 环境的管理和切换。

https://rvm.io/

如果你打算学习 Ruby / Rails, RVM 是必不可少的工具之一。

RVM 安装$ gpg2 --recv-keys 409B6B1796C275462A1703113804BB82D39DC0E3 7D2BAF1CF37B13E2069D6956105BD0E739499BDB$ \\curl -sSL https://get.rvm.io | bash -s stable$ source ~/.bashrc$ source ~/.bash_profile

修改 RVM 的 Ruby 安装源到 Ruby China 的 Ruby 镜像服务器,这样能提高安装速度

echo \"ruby_url=https://cache.ruby-china.com/pub/ruby\" /usr/local/rvm/user/db

列出已知的 Ruby 版本

#rvm list known# MRI Rubies[ruby-]1.8.6[-p420][ruby-]1.8.7[-head] # security released on head[ruby-]1.9.1[-p431][ruby-]1.9.2[-p330][ruby-]1.9.3[-p551][ruby-]2.0.0[-p648][ruby-]2.1[.10][ruby-]2.2[.10][ruby-]2.3[.8][ruby-]2.4[.6][ruby-]2.5[.5][ruby-]2.6[.3][ruby-]2.7[.0-preview1]ruby-head# for forks use: rvm install ruby-head- name --url https://github.com/github/ruby.git --branch 2.2# JRubyjruby-1.6[.8]jruby-1.7[.27]jruby-9.1[.17.0]jruby[-9.2.7.0]jruby-head# Rubiniusrbx-1[.4.3]rbx-2.3[.0]rbx-2.4[.1]rbx-2[.5.8]rbx-3[.107]rbx-4[.3]rbx-head# TruffleRubytruffleruby[-19.1.0]# Opal# Minimalistic ruby implementation - ISO 30170:2012mruby-1.0.0mruby-1.1.0mruby-1.2.0mruby-1.3.0mruby-1[.4.1]mruby-2[.0.1]mruby[-head]# Ruby Enterprise Editionree-1.8.6ree[-1.8.7][-2012.02]# Topaztopaz# MagLevmaglev-1.0.0maglev-1.1[RC1]maglev[-1.2Alpha4]maglev-head# Mac OS X Snow Leopard Or Newermacruby-0.10macruby-0.11macruby[-0.12]macruby-nightlymacruby-head# IronRubyironruby[-1.1.3]ironruby-head

安装一个 Ruby 版本

#rvm install 2.6.3Searching for binary rubies, this might take some time.No binary rubies available for: centos/7/x86_64/ruby-2.6.3.Continuing with compilation. Please read \'rvm help mount\' to get more information on binary rubies.Checking requirements for centos.Requirements installation successful.Installing Ruby from source to: /usr/local/rvm/rubies/ruby-2.6.3, this may take a while depending on your cpu(s)...ruby-2.6.3 - #downloading ruby-2.6.3, this may take a while depending on your connection...** Resuming transfer from byte position 4009984 % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed100 10.0M 100 10.0M 0 0 8270k 0 0:00:01 0:00:01 --:--:-- 8275kruby-2.6.3 - #extracting ruby-2.6.3 to /usr/local/rvm/src/ruby-2.6.3.....ruby-2.6.3 - #configuring......................................................................ruby-2.6.3 - #post-configuration..ruby-2.6.3 - #compiling.............................................................................................ruby-2.6.3 - #installing................................ruby-2.6.3 - #making binaries executable..ruby-2.6.3 - #downloading rubygems-3.0.6 % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed100 866k 100 866k 0 0 5355 0 0:02:45 0:02:45 --:--:-- 10029No checksum for downloaded archive, recording checksum in user configuration.ruby-2.6.3 - #extracting rubygems-3.0.6.....ruby-2.6.3 - #removing old rubygems........ruby-2.6.3 - #installing rubygems-3.0.6...............................................ruby-2.6.3 - #gemset created /usr/local/rvm/gems/ruby-2.6.3@globalruby-2.6.3 - #importing gemset /usr/local/rvm/gemsets/global.gems................................................................ruby-2.6.3 - #generating global wrappers.......ruby-2.6.3 - #gemset created /usr/local/rvm/gems/ruby-2.6.3ruby-2.6.3 - #importing gemsetfile /usr/local/rvm/gemsets/default.gems evaluated to empty gem listruby-2.6.3 - #generating default wrappers.......ruby-2.6.3 - #adjusting #shebangs for (gem irb erb ri rdoc testrb rake).Install of ruby-2.6.3 - #complete Ruby was built without documentation, to build it run: rvm docs generate-ri

查看安装的ruby

#rvm list=* ruby-2.6.3 [ x86_64 ]# = - current# =* - current default# * - default 卸载 x 雷某度!GitHub 标星 1.5w+,从此我只用这款全能高速下载工具! 12-29 \"\"19万+ CentOS7搭建ruby环境(RVM安装ruby以及ruby加速) 02-11 \"\"1275 Synchronized关键字深析(小白慎入,深入jvm源码,两万字长文) 04-07 \"\"2万+

本文链接: https://www.ebiomall.cn/b553-bangslabs/info-1567596633.html

免责声明 本文仅代表作者个人观点,与本网无关。其创作性以及文中陈述文字和内容未经本站证实,对本文以及其中全部或者部分内容、文字的真实性、完整性、及时性本站不做任何保证或承诺,请读者仅作参考,并请自行核实相关内容。
版权声明 未经蚂蚁淘授权不得转载、摘编或利用其他方式使用上述作品。已经经本网授权使用作品的,应该授权范围内使用,并注明“来源:蚂蚁淘”。违反上述声明者,本网将追究其相关法律责任。
没有了