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.

Requirements

Ensure you have the following programs and libraries installed. Also see the subsections below for special requirements for your particular operating system.

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.

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

Debian/Ubuntu

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

Installing Rubinius

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

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

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

Troubleshooting

See common problems and visit us in the #rubinius IRC channel on irc.freenode.net.