Skip to content

Instantly share code, notes, and snippets.

@ravibhure
Last active August 29, 2015 14:06
Show Gist options
  • Save ravibhure/134adce1b072bdf70533 to your computer and use it in GitHub Desktop.
Save ravibhure/134adce1b072bdf70533 to your computer and use it in GitHub Desktop.
Install ruby using rvm
#!/bin/bash
# Author: Ravi Bhure <[email protected]>
# Ref: http://rvm.io/rubies/installing
wget http://dl.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm -O /tmp/epel.rpm
rpm -ivh /tmp/epel.rpm
# We need to install all required packages for ruby installation on our system using following command
yum install -y gcc-c++ patch readline readline-devel zlib zlib-devel libyaml-devel libffi-devel openssl-devel make bzip2 autoconf automake libtool bison iconv-devel
# Install curl
yum -y install curl
# Install rvm
curl -L get.rvm.io | bash -s stable
# Setup RVM Environment
source /etc/profile.d/rvm.sh
# Install Ruby
rvm install 2.1.1
# Setup Default Ruby Version
rvm use 2.1.1 --default
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment