Skip to content

Commit

Permalink
Merge pull request #17 from nruth/cut-building-ruby1.8-from-readme
Browse files Browse the repository at this point in the history
Removing notes on installing gc patched 1.8.x/1.9
  • Loading branch information
senny committed Jul 2, 2015
2 parents 2d4bbd6 + 297cb3e commit 9504177
Showing 1 changed file with 2 additions and 88 deletions.
90 changes: 2 additions & 88 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -422,95 +422,9 @@ Rails.logger.level = ActiveSupport::Logger::INFO
As `ActionController::Base.perform_caching` is set to `true`, performance tests
will behave much as they do in the `production` environment.

### Installing GC-Patched MRI
### Installing GC-Patched MRI 1.x.x

To get the best from Rails' performance tests under MRI, you'll need to build
a special Ruby binary with some super powers.

The recommended patches for each MRI version are:

| Version | Patch |
| --------------- | --------- |
| 1.8.6 | ruby186gc |
| 1.8.7 | ruby187gc |
| 1.9.2 and above | gcdata |

All of these can be found on [RVM's _patches_ directory](https://github.com/wayneeseguin/rvm/tree/master/patches/ruby)
under each specific interpreter version.

Concerning the installation itself, you can either do this easily by using
[RVM](https://rvm.io/) or you can build everything from source,
which is a little bit harder.

#### Install Using RVM

The process of installing a patched Ruby interpreter is very easy if you let RVM
do the hard work. All of the following RVM commands will provide you with a
patched Ruby interpreter:

```bash
$ rvm install 1.9.2-p180 --patch gcdata
$ rvm install 1.8.7 --patch ruby187gc
$ rvm install 1.9.2-p180 --patch ~/Downloads/downloaded_gcdata_patch.patch
```

You can even keep your regular interpreter by assigning a name to the patched
one:

```bash
$ rvm install 1.9.2-p180 --patch gcdata --name gcdata
$ rvm use 1.9.2-p180 # your regular ruby
$ rvm use 1.9.2-p180-gcdata # your patched ruby
```

And it's done! You have installed a patched Ruby interpreter.

#### Install From Source

This process is a bit more complicated, but straightforward nonetheless. If
you've never compiled a Ruby binary before, follow these steps to build a
Ruby binary inside your home directory.

##### Download and Extract

```bash
$ mkdir rubygc
$ wget <the version you want from ftp://ftp.ruby-lang.org/pub/ruby>
$ tar -xzvf <ruby-version.tar.gz>
$ cd <ruby-version>
```

##### Apply the Patch

```bash
$ curl http://github.com/wayneeseguin/rvm/raw/master/patches/ruby/1.9.2/p180/gcdata.patch | patch -p0 # if you're on 1.9.2!
$ curl http://github.com/wayneeseguin/rvm/raw/master/patches/ruby/1.8.7/ruby187gc.patch | patch -p0 # if you're on 1.8.7!
```

##### Configure and Install

The following will install Ruby in your home directory's `/rubygc` directory.
Make sure to replace `<homedir>` with a full patch to your actual home
directory.

```bash
$ ./configure --prefix=/<homedir>/rubygc
$ make && make install
```

##### Prepare Aliases

For convenience, add the following lines in your `~/.profile`:

```bash
alias gcruby='~/rubygc/bin/ruby'
alias gcrake='~/rubygc/bin/rake'
alias gcgem='~/rubygc/bin/gem'
alias gcirb='~/rubygc/bin/irb'
alias gcrails='~/rubygc/bin/rails'
```

Don't forget to use your aliases from now on.
Since Ruby 2 is now mainstream and handles garbage collection issues these docs have been cut. [View older readme explaning how to install optimized Ruby 1 builds](https://github.com/rails/rails-perftest/blob/2d4bbd6206f86a3bbe38ed825dddbf555ffdce41/README.md#installing-gc-patched-mri).

Command Line Tools
------------------
Expand Down

0 comments on commit 9504177

Please sign in to comment.