Skip to content

Instantly share code, notes, and snippets.

@lime
Forked from philou/rbenv-patch
Last active January 28, 2016 15:28
Show Gist options
  • Save lime/3e6d9a04e4c9a623e0fe to your computer and use it in GitHub Desktop.
Save lime/3e6d9a04e4c9a623e0fe to your computer and use it in GitHub Desktop.
This script uses skaes/rvm-patchsets to patch a ruby-build package before installing it with rbenv. It uses ruby 2.1.2 with all patches in the railsexpress patchset, but it should work with any ruby / patch as long as they are compatible.
#!/bin/sh
mkdir /tmp/ruby-build-patch
cd /tmp/ruby-build-patch
# download the patches
git clone git@github.com:skaes/rvm-patchsets.git
# download and rename the ruby-build version definition
wget https://raw.github.com/sstephenson/ruby-build/master/share/ruby-build/2.1.2
mv /tmp/ruby-build-patch/2.1.2 /tmp/ruby-build-patch/2.1.2-railsexpress
# patch and install
cat /tmp/ruby-build-patch/rvm-patchsets/patches/ruby/2.1.2/railsexpress/*.patch | rbenv install --patch /tmp/ruby-build-patch/2.1.2-railsexpress
# clean up
cd /tmp
rm -rf /tmp/ruby-build-patch
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment