Skip to content

Instantly share code, notes, and snippets.

@grobie
Created May 31, 2011 16:00
Show Gist options
  • Save grobie/1000758 to your computer and use it in GitHub Desktop.
Save grobie/1000758 to your computer and use it in GitHub Desktop.
Install ruby-head (1.9.3) and patch `require`
# Install ruby-head (1.9.3) and patch `require`
#
# using: rvm and homebrew
# update dependencies
brew install libyaml readline
# update rvm
rvm get head
rvm reload
cd $PROJECT
# log old bootup time
time ruby -e 'require "./config/environment"'
# install patched ruby version
curl https://gist.github.com/raw/996418/e2b346fbadeed458506fc69ca213ad96d1d08c3e/require-performance-fix-r31758.patch > /tmp/require-performance-fix.patch
rvm install ruby-head --patch /tmp/require-performance-fix.patch -n patched --with-libyaml-dir=/usr/local --with-readline-dir=/usr/local/
# use new ruby version and install all dependecies
rvm use ruby-head-patched
gem install bundler
gem install gherkin --version 2.3.2 -- --with-cflags="-std=c99"
bundle
# log old bootup time
time ruby -e 'require "./config/environment"'
# ruby 1.9.2p136 (2010-12-25 revision 30365) [x86_64-darwin10.6.0]
real 0m24.660s
user 0m21.236s
sys 0m2.234s
# ruby 1.9.3dev (2011-06-01) [x86_64-darwin10.7.0] with patch
real 0m21.619s
user 0m18.043s
sys 0m1.661s
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment