Created
November 1, 2012 10:44
-
-
Save kucaahbe/3993003 to your computer and use it in GitHub Desktop.
Install custom ruby on heroku
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 | |
CURRENT_DIR=$PWD | |
RUBY_VERSION=1.9.3-p194-perf | |
# same path used for heroku, do not change | |
RUBY_BUILD_PATH=vendor/ruby-1.9.3 | |
curl -L https://github.com/sstephenson/ruby-build/tarball/master | tar zx | |
echo | |
echo '---> prerequisites downloaded' | |
echo | |
curl -o $RUBY_VERSION https://raw.github.com/gist/3988516/2-1.9.3-p194-patched.sh | |
cp $RUBY_VERSION sstephenson-ruby-build-*/share/ruby-build | |
export CONFIGURE_OPTS='--disable-install-doc --disable-install-rdoc --disable-install-capi --with-static-linked-ext --enable-load-relative' | |
./sstephenson-ruby-build-*/bin/ruby-build -v $RUBY_VERSION $CURRENT_DIR/$RUBY_BUILD_PATH | |
echo | |
echo '---> ruby compiled' | |
echo | |
cd $RUBY_BUILD_PATH | |
tar -cf ruby-$RUBY_VERSION.tar * | |
gzip ruby-$RUBY_VERSION.tar | |
mv ruby-$RUBY_VERSION.tar.gz $CURRENT_DIR/ruby-$RUBY_VERSION.tgz | |
cd $CURRENT_DIR | |
ls -l | |
curl -o dropbox.sh https://raw.github.com/andreafabrizi/Dropbox-Uploader/master/dropbox_uploader.sh | |
chmod +x dropbox.sh | |
./dropbox.sh upload $CURRENT_DIR/ruby-$RUBY_VERSION.tgz |
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
# run on heroku console | |
curl https://raw.github.com/gist/3993003/heroku.sh | sh |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment