Skip to content

Instantly share code, notes, and snippets.

@dragosperca
Last active August 29, 2015 14:25
Show Gist options
  • Save dragosperca/b1e8ccf33e21f7327cb0 to your computer and use it in GitHub Desktop.
Save dragosperca/b1e8ccf33e21f7327cb0 to your computer and use it in GitHub Desktop.
#!/usr/bin/env bash
# repository
yum -y remove ruby
yum -y update
yum -y install curl wget
cd /tmp/ && mkdir -p kit && cd kit
wget http://ftp.astral.ro/mirrors/fedora/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm
rpm -ivh epel-release-6-8.noarch.rpm
rpm --import /etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-6
sudo sed -i "s/mirrorlist=https/mirrorlist=http/" /etc/yum.repos.d/epel.repo
yum -y groupinstall "Development tools"
yum -y install libxslt-devel libyaml-devel libxml2-devel gdbm-devel libffi-devel zlib-devel openssl-devel libyaml-devel readline-devel curl-devel openssl-devel pcre-devel git memcached-devel valgrind-devel mysql-devel ImageMagick-devel ImageMagick
wget http://cache.ruby-lang.org/pub/ruby/2.1/ruby-2.1.2.tar.gz
tar xvfvz ruby-2.1.2.tar.gz
cd ruby-2.1.2
./configure --prefix=/usr
make
make install
# ruby-gems
version=2.2.0
cd ..
wget http://production.cf.rubygems.org/rubygems/rubygems-$version.tgz
tar zxvf rubygems-$version.tgz
cd rubygems-$version
/usr/bin/ruby setup.rb
gem install bundler --no-ri --no-rdoc
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment