Skip to content

Instantly share code, notes, and snippets.

@AstonJ
Created June 8, 2012 16:47
Show Gist options
  • Save AstonJ/2896818 to your computer and use it in GitHub Desktop.
Save AstonJ/2896818 to your computer and use it in GitHub Desktop.
Install/Upgrade Ruby on CentOS 6.2
#get root access
$su -
$ 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
#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
@sovicheacheth
Copy link

Nice post

@esen
Copy link

esen commented Jan 29, 2014

Thanks. that helped me

@stuartphilp
Copy link

Thanks for this. I also had to grab EPEL before making libyaml, and libffi before making ruby

@drmunklung
Copy link

Thanks! You're making things easy for non-Rails guys like me

@tuxchetan
Copy link

Thanks! pretty straight steps. After installation, I was easily able to install knife-spork and knife-block plugins.

@dotrinh-DM
Copy link

Thanks! Nice post!

@zhiqunq
Copy link

zhiqunq commented Oct 9, 2015

Thanks !!

@marks-chan
Copy link

Thanks! Nice post!

@vtharmalingam
Copy link

Thank you...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment