How to Install Ruby on CentOS/RHEL 7/6
How to Install Ruby on CentOS/RHEL 7/6 . Ruby is a dynamic, object-oriented programming language focused on simplicity and productivity. RVM (Ruby Version Manager) is a tool for installing and managing multiple Ruby versions on single operating systems. This tutorial will help you to install RVM on your system. After that install the latest Ruby on CentOS and RedHat systems using RVM.
Step 1 – Installing Requirements
First of all, you need to install all required packages for ruby installation on our system using the following command.
yum install gcc-c++ patch readline readline-devel zlib zlib-devel \
libyaml-devel libffi-devel openssl-devel make \
bzip2 autoconf automake libtool bison iconv-devel sqlite-devel
Step 2 – Install RVM
Now, install the latest stable version of RVM on your system using the following command. This command will automatically download all required files and install on your system.
curl -sSL https://rvm.io/mpapis.asc | gpg2 --import -
curl -sSL https://rvm.io/pkuczynski.asc | gpg2 --import - curl -L get.rvm.io | bash -s stable
Also, run below command to load the RVM environment.
source /etc/profile.d/rvm.sh
rvm reload
Step 3 – Verify Dependencies
Now use the following command to verify all dependencies are properly installed. This will install any missing dependencies on your system.
rvm requirements run Checking requirements for centos.
Requirements installation successful.
Step 4 – Install Ruby on CentOS
Now, your system is ready for the Ruby installation. You can find the available Ruby version for installation using below command.
rvm list known
Then install the required Ruby version on your system. Here, I am installing Ruby 2.6 on my CentOS system. You can simply replace the version to below command of your choice and install.
rvm install 2.6
Step 5 – Setup Default Ruby Version
First of all, check the currently installed ruby versions on your system. So that we can find which version is using currently by the system and which is set to default.
rvm list ruby-2.4.4 [ x86_64 ]
* ruby-2.5.1 [ x86_64 ]
=> ruby-2.6.0 [ x86_64 ] # => - current
# =* - current && default
# * - default
After that use rvm command to set up the default ruby version to be used by applications.
rvm use 2.6 --default Using /usr/local/rvm/gems/ruby-2.6.0
Step 6 – Verify Active Ruby Version
Using following command you can check the current ruby version is used.
ruby --version ruby 2.6.0p0 (2018-12-25 revision 66547) [x86_64-linux]
Congratulation’s, Finally you have successfully installed Ruby on your system. Read our next articles to deploy Ruby with Apache or Ruby with Nginx web server with simple steps.
References:
1. http://rvm.io/rubies/installing
How to Install Ruby on CentOS/RHEL 7/6的更多相关文章
- Steps to Install Hadoop on CentOS/RHEL 6---reference
http://tecadmin.net/steps-to-install-hadoop-on-centosrhel-6/# The Apache Hadoop software library is ...
- How to Install Tomcat 8.0.27 on CentOS/RHEL and Ubuntu【转】
https://tecadmin.net/install-tomcat-8-on-centos-rhel-and-ubuntu/ Apache Tomcat is an opensource web ...
- Install Google Chrome on Fedora 28/27, CentOS/RHEL 7.5 (在 fedora 28 等 上 安装 chrome)
今天在使用 fedora 安装 chrome 的时候遇到了问题,今天进行将安装过程进行记录下来.需要安装第三方软件仓库. 我们需要进行安装 fedora-workstation-repositorie ...
- Install LAMP Server (Apache, MariaDB, PHP) On CentOS/RHEL/Scientific Linux 7
Install LAMP Server (Apache, MariaDB, PHP) On CentOS/RHEL/Scientific Linux 7 By SK - August 12, 201 ...
- [转载]How to Install Google Chrome 39 in CentOS/RHEL 6 and Fedora 19/18
FROM: http://tecadmin.net/install-google-chrome-in-centos-rhel-and-fedora/ Google Chrome is a freewa ...
- [转载]Install Opera 12.16 Web Browser in CentOS/RHEL and Fedora
FROM: http://tecadmin.net/install-opera-web-browser-in-centos-rhel-fedora/ Opera is an modern web br ...
- 转: How to Install MongoDB 3.2 on CentOS/RHEL & Fedora (简单易懂)
from: http://tecadmin.net/install-mongodb-on-centos-rhel-and-fedora/ MongoDB (named from “huMONGOus ...
- 如何在CentOS/RHEL & Fedora上安装MongoDB 3.2
MongoDB(名称取自"huMONGOus")是一个有着全面灵活的索引支持和丰富的查询的数据库.MongoDB通过GridFS提供强大的媒体存储.点击这里获取MongoDB的更多 ...
- How To Install Java on CentOS and Fedora
PostedDecember 4, 2014 453.8kviews JAVA CENTOS FEDORA Introduction This tutorial will show you how ...
随机推荐
- FFMPEG SDK 开发介绍(原创)
来源:http://blog.sina.com.cn/s/blog_62a8419a01016exv.html 本文是作者在使用ffmpeg sdk开发过程中的实际经验,现在与大家分享,欢迎学习交流. ...
- 一次 Young GC 的优化实践(FinalReference 相关)
本文转载自公众号:涤生的博客,阅读时间大约需要11分钟.涤生的文章看起来跟破案一样,很精彩,很有启发. 前言 博客已经好久没有更新了,主要原因是 18 年下半年工作比较忙,另外也没有比较有意思的题材, ...
- MongoDB用户和密码登录
一.MongoDB中内置角色 角色 介绍 read 提供读取所有非系统的集合(数据库) readWrite 提供读写所有非系统的集合(数据库)和读取所有角色的所有权限 dbAdmin 提供执行管理任务 ...
- 后缀表达式 Java实现
基本原理: 从左到右扫描字符串:1.是操作数:压栈. 2.是操作符:出栈两个操作数,将运算结果压栈. 扫描字符串通过java.util.Scanner类实现,其next方法可以读取以空格(默认)或指定 ...
- GitPython模块
GitPython模块 安装: pip3 install gitpython Gitpython 操作 import os from git.repo import Repo import json ...
- Linux命令groupadd
groupadd [选项] 组 创建一个新的组.Groupadd命令使用命令行中指定的值加上系统默认值创建新的组账户.新组将根据需要输入系统. (1).选项 -f,--force 如果指定的组已经存在 ...
- 接触手机脚本编程------基于触动精灵的lua编程
Auto.js好用多了,还不用root直接能用,我为什么学这个呢..... 最近因为学习需要开始接触一门新的脚本语言,我更深刻的发现了,语言只是一种工具,重要的是解决问题的思维,由于这次是需要我快速掌 ...
- 接口自动化--unittest
今天我介绍一个测试框架:不管我们是做接口自动化还是UI自动化,我们都要用的一个框架---unittest unittest是python里面的一个单元测试框架,我们做自动化测试的话,都是要用到这个测试 ...
- 项目Beta冲刺(团队)——05.23(1/7)
项目Beta冲刺(团队)--05.23(1/7) 格式描述 课程名称:软件工程1916|W(福州大学) 作业要求:项目Beta冲刺(团队) 团队名称:为了交项目干杯 作业目标:记录Beta敏捷冲刺第1 ...
- git 学习记录—— git 中的仓库、文件状态、修改和提交操作等
最近开始学习使用版本控制工具 git .学习方式主要通过阅读 git 网站上的 Pro git 和动手实践,使用的系统为 Ubuntu16.04LTS,以及 Windows 8.1. 本文主要关注 ...