1. Getting Started

This guide will help you get Rubinius running. It assumes you know something
about Ruby and about installing software on your system.

If you have trouble following the directions here, visit the #rubinius IRC
channel on irc.freenode.net for help.


2. Requirements

Ensure you have the following installed. Also see the subsections below for
special requirements for your particular operating system. See the footnotes
for more information about each requirement.

  * GCC 4.x [1]
  * GNU Bison [2]
  * MRI 1.8.7 [3]
  * Rubygems [4]
  * Git [5]
  * ZLib [6]
  * pthread [7]
  * gmake [8]
  * rake [9]

2.1 Apple OS X

The easiest way to get a build environment on Apple OS X is to install the
XCode Tools and Utilities. Once installed, you can enable developer mode crash
reporting at:

  /Developer/Applications/Utilities/CrashReporterPrefs.app

2.2 Debian/Ubuntu

  * ruby-dev or ruby1.8-dev
  * libreadline5-dev
  * zlib1g-dev
  * libssl-dev


3. Building Rubinius

You can build and run Rubinius from the source directory. You do not need to
install Rubinius to run it. The directions below will detail both installing
Rubinius and running it from the source directory.

Rubinius uses LLVM for the JIT compiler. Rubinius depends on a particular
version of LLVM. If you have installed LLVM on your system, pass the
'--skip-system' flag to the configure script in the directions below.

The Rubinius source code is on Github:

  git://github.com/evanphx/rubinius.git

3.1 Installing Rubinius

  1. ./configure --prefix=/path/to/install/dir
  2. rake install
  3. Add /path/to/install/dir/bin to your PATH

3.2 Running from the Source Directory

If you plan to work on Rubinius itself, this is the simplest option.

  1. ./configure
  2. rake
  3. Add /path/to/source/dir/bin to your PATH


4. Running Rubinius

Once you have followed the steps for building (and possibly installing)
Rubinius, you can verify it is working:

    rbx -v

Rubinius generally works like Ruby from the command-line. For example:

    rbx -e 'puts "Hello!"'

To run a ruby file named 'code.rb':

    rbx code.rb

To run IRB:

    rbx


5. Troubleshooting

See doc/common_problems.txt and visit us in the #rubinius IRC channel on
irc.freenode.net.

---------
Footnotes

The following are suggestions for getting more information about the programs
and libraries needed to build Rubinius. Your operating system or package
manager may have other packages available.

[1] Both g++ and gcc. http://gcc.gnu.org/
[2] http://www.gnu.org/software/bison/
[3] If your system does not have Ruby 1.8.7 installed, consider using rvm
    to install it. http://rvm.beginrescueend.com/
    The official MRI website http://www.ruby-lang.org/
[4] http://www.rubygems.org/
[5] http://git.or.cz/
[6] http://www.zlib.net/
[7] The pthread library should be provided by your operating system.
[8] http://savannah.gnu.org/projects/make/
[9] [sudo] gem install rake
