Skip to content

Instantly share code, notes, and snippets.

@hieubuiduc
Created January 24, 2014 07:53
Show Gist options
  • Save hieubuiduc/8593656 to your computer and use it in GitHub Desktop.
Save hieubuiduc/8593656 to your computer and use it in GitHub Desktop.
Install Ruby for CentOS
#!/bin/sh
# Created by Hieu Bui Duc
cd /tmp
#Remove old Ruby
yum remove ruby
# Install dependencies
yum groupinstall "Development Tools"
yum install zlib zlib-devel
yum install openssl-devel
wget http://pyyaml.org/download/libyaml/yaml-0.1.4.tar.gz
tar xzvf yaml-0.1.4.tar.gz
cd yaml-0.1.4
./configure
make
make install
# Install ruby
wget http://ftp.ruby-lang.org/pub/ruby/1.9/ruby-1.9.3-p194.tar.gz
tar zxf ruby-1.9.3-p194.tar.gz
cd ruby-1.9.3-p194
./configure
make
make install
# Update rubygems
gem update --system
gem install bundler
# Rails
yum install sqlite-devel
gem install rails
gem install sqlite3
# Fix link bundler
ln -s /usr/local/bin/ruby /usr/bin/ruby
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment