-
-
Save edelgado/208005f645b27c0eda90 to your computer and use it in GitHub Desktop.
This script uses a patch from the rvm repo to patch a ruby-build package before installing it with rbenv. It uses ruby 1.9.3-p484 with gcdata patch, but it should work with any ruby / patch as long as they are compatible.
This file contains 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/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-p484.tar.gz | |
tar xzf ruby-1.9.3-p484.tar.gz | |
cd ruby-1.9.3-p484 | |
curl https://raw.githubusercontent.com/wayneeseguin/rvm/master/patches/ruby/1.9.3/p125/gcdata.patch | patch -p1 | |
cd .. | |
mv ruby-1.9.3-p484 ruby-1.9.3-p484-gcdata | |
tar -cf ruby-1.9.3-p484-gcdata.tar.gz ruby-1.9.3-p484-gcdata | |
# download and patch the ruby-build version definition | |
wget https://raw.githubusercontent.com/sstephenson/ruby-build/master/share/ruby-build/1.9.3-p484 | |
sed 's|"ruby-1.9.3-p484.*|"ruby-1.9.3-p484-gcdata" "file:///tmp/ruby-build-patch/ruby-1.9.3-p484-gcdata.tar.gz"|' < 1.9.3-p484 > 1.9.3-p484-gcdata | |
#install the patched version | |
rbenv install /tmp/ruby-build-patch/1.9.3-p484-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