Created
April 1, 2012 14:35
-
-
Save mickeb/2275635 to your computer and use it in GitHub Desktop.
ruby_install.sh
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
/usr/bin/apt-get update | |
/usr/bin/apt-get install -y build-essential git-core curl bison openssl libreadline6 libreadline6-dev curl git-core zlib1g zlib1g-dev libssl-dev libyaml-dev libsqlite3-0 libsqlite3-dev sqlite3 libxml2-dev libxslt-dev autoconf libc6-dev ncurses-dev automake ruby libffi5 libffi-dev | |
RUBY_PATH=/usr/local/ruby | |
YAML_PATH=/usr/local/yaml | |
ruby='1.9.3-p125' | |
cd /tmp | |
wget http://pyyaml.org/download/libyaml/yaml-0.1.4.tar.gz | |
wget http://ftp.ruby-lang.org/pub/ruby/1.9/ruby-$ruby.tar.gz | |
tar -xzvf yaml-0.1.4.tar.gz | |
cd yaml-0.1.4 | |
./configure --prefix=$YAML_PATH | |
make | |
make install | |
cd .. | |
tar -xzvf ruby-$ruby.tar.gz | |
cd ruby-$ruby | |
curl https://github.com/ruby/ruby/pull/47.diff | git apply | |
curl https://raw.github.com/gist/1859082/performance_and_backport_gc.patch | patch -p1 | |
./configure --prefix=$RUBY_PATH --disable-install-doc --with-opt-dir=$YAML_PATH | |
make | |
make install | |
apt-get purge -y ruby | |
apt-get autoremove -y | |
apt-get autoclean -y | |
echo 'PATH=/usr/local/ruby/bin:$PATH' > /etc/profile.d/ruby.sh | |
chmod +x /etc/profile.d/ruby.sh | |
source /etc/profile.d/ruby.sh |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment