Skip to content

Instantly share code, notes, and snippets.

@scottjbarr
Created January 7, 2010 05:00
Show Gist options
  • Save scottjbarr/271006 to your computer and use it in GitHub Desktop.
Save scottjbarr/271006 to your computer and use it in GitHub Desktop.
Install Ruby 1.9 from source
#!/bin/bash
#
# Install Ruby 1.9 from source
#
# Author : Scott Barr
# Date : 7 Jan 2010
VERSION=ruby-1.9.1-p378
cd /usr/local/src
wget ftp://ftp.ruby-lang.org/pub/ruby/1.9/${VERSION}.tar.gz
tar -zxf ${VERSION}.tar.gz
cd ${VERSION}
./configure --program-suffix=19
#
# On Debian Lenny, you may need to dodge a gcc bug which exists at Dec 2009
# which causes parse.c to hang when compiling.
#
# Edit the resulting Makefile to change the line from…
# optflags = -O2
# to
# optflags = -O3
#
make
sudo make install
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment