Skip to content

Instantly share code, notes, and snippets.

@mcianni
Forked from philou/rbenv-patch
Last active August 29, 2015 14:13
Show Gist options
  • Save mcianni/cc169966d02924db14dd to your computer and use it in GitHub Desktop.
Save mcianni/cc169966d02924db14dd to your computer and use it in GitHub Desktop.
#!/bin/sh
mkdir /tmp/ruby-build-patch
cd /tmp/ruby-build-patch
# download and patch the ruby sources
wget http://ftp.ruby-lang.org/pub/ruby/1.9/ruby-1.9.3-p125.tar.gz
tar xzf ruby-1.9.3-p125.tar.gz
cd ruby-1.9.3-p125
curl https://raw.github.com/wayneeseguin/rvm/master/patches/ruby/1.9.3/p125/gcdata.patch | patch -p1
cd ..
mv ruby-1.9.3-p125 ruby-1.9.3-p125-gcdata
tar -cvf ruby-1.9.3-p125-gcdata.tar.gz ruby-1.9.3-p125-gcdata
# download and patch the ruby-build version definition
wget https://raw.github.com/sstephenson/ruby-build/master/share/ruby-build/1.9.3-p125
sed 's|"ruby-1.9.3-p180.*|"ruby-1.9.3-p180-gcdata" "file:///tmp/ruby-build-patch/ruby-1.9.3-p125-gcdata"|' < 1.9.3-p125 > 1.9.3-p125-gcdata
#install the patched version
rbenv install /tmp/1.9.3-p125-gcdata
cd /tmp
rm -rf ruby-build-patch
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment