Skip to content

Instantly share code, notes, and snippets.

@freekrai
Forked from slouma2000/install_ruby_1.9.3
Last active February 14, 2016 18:00
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save freekrai/6f2bb7d71ecf54ec90de to your computer and use it in GitHub Desktop.
Save freekrai/6f2bb7d71ecf54ec90de to your computer and use it in GitHub Desktop.
Install Ruby 1.9.3 on CentOS, RedHat using RVM
Step 1: Upgrade Packages
# yum update
# yum -ygroupinstall "Development Tools"
Step 2: Installing Recommended Packages
# yum -y install gcc-c++ patch readline readline-devel zlib zlib-devel
# yum -y install libyaml-devel libffi-devel openssl-devel make
# yum -y install bzip2 autoconf automake libtool bison iconv-devel
Step 3: Install RVM ( Ruby Version Manager )
curl -L get.rvm.io | bash -s stable
Step 4: Setup RVM Environment
source /etc/profile.d/rvm.sh
Step 5: Install Required Ruby Version
# rvm install 1.9.3
Step 6: Install Another Version ( if Required )
# rvm install 1.8.6
Step 7: Setup Default Ruby Version
rvm use 1.9.3 --default
Step 8: Check Current Ruby Version
# ruby --version
Update rubygems
$ gem update --system
$ gem install bundler
#Test ruby and rubygems are working
#Close shell and reopen for changes to take effect
$ruby -v
$gem --version
# Rails
$ yum install sqlite-devel
$ gem install rails
$ gem install sqlite3
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment