Skip to content

Instantly share code, notes, and snippets.

@adilsoncarvalho
Last active October 12, 2015 01:58
Show Gist options
  • Save adilsoncarvalho/3954276 to your computer and use it in GitHub Desktop.
Save adilsoncarvalho/3954276 to your computer and use it in GitHub Desktop.
Installing Ruby 1.9.3p286 on Ubuntu (production server)
#!/bin/bash
# must run as root!!!
RUBY_VERSION=1.9
RUBY_PATCH=1.9.3-p429
#RUBY_PATCH=1.9.3-p385
#RUBY_PATCH=1.9.3-p286
#RUBY_PATCH=1.9.3-p194
aptitude install -y build-essential libssl-dev libreadline-dev zlib1g-dev libyaml-dev libffi-dev
cd ~
wget http://ftp.ruby-lang.org/pub/ruby/$RUBY_VERSION/ruby-$RUBY_PATCH.tar.gz
tar -zxvf ruby-$RUBY_PATCH.tar.gz
cd ~/ruby-$RUBY_PATCH
./configure
make
make install
gem update --system
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment