= Installation guide for Rubinius as of 10/2007
If you are having trouble with installation, the #rubinius IRC channel on
irc://irc.freenode.net will help.
== Getting the software and required libraries
There are a few things that you need in order to be able to build and run
Rubinius. Once you have installed the general requirements, install the Gems
needed and then any platform-specific requirements.
=== General requirements
* "GCC version 4.x":http://gcc.gnu.org/
* "GNU Bison":http://www.gnu.org/software/bison/
* "gmake (GNU Make)":http://savannah.gnu.org/projects/make/
* "Ruby version >= 1.8.4 (the Ruby language)":http://www.ruby-lang.org/
* "RubyGems (Ruby package manager)":http://www.rubygems.org/
* "Git (source control used by rubinius)":http://git.or.cz/
Each package may have requirements of its own, of course.
If you want to avoid overriding your existing environment, you may want to
install everything under its own prefix (such as /usr/local) and to name
programs so they don't collide with your existing installation (such as naming
gmake 'gmake'). You can then adjust your PATH environment variable as needed
for rubinius development.
=== Requirements through RubyGems
* rake
Rake may be obtained with the `gem install` command. See `gem help` and
http://www.rubygems.org for more information.
== Rubinius itself
You need to check Rubinius out through Git (which we just installed). The
invocation looks like this:
git clone http://git.rubini.us/code rubinius
For more information on rubinius' best practices for git, see "using
git":http://rubinius.lighthouseapp.com/projects/5089/using-git
Rubinius can also be cloned via github:
git clone git://github.com/evanphx/rubinius.git rubinius
== Getting the RubySpec submodules
You need to fetch the source for MSpec and the RubySpec submodules manually.
After running 'git clone' above, run:
rake spec:update
The spec:update task is also a dependency of the git:update task. So, if you
use the rake tasks for updating your Rubinius sources, the MSpec and RubySpec
source will automatically be updated. If you use the git commands manually,
you will need to run rake spec:update also.
== Compiling Rubinius
Once you have all the prerequisites installed, building rubinius is as simple
as:
cd /path/to/rubinius
rake build
This will give you a binary, @./shotgun/rubinius@ which can then be invoked to
run scripts. If your system compiler is not GCC 4.x, you can set the CC environment variable:
CC=/path/to/gcc rake build
If you want a development version (no optimisations, extra debug info), set the DEV environment variable:
DEV=1 rake build
== Installing Rubinius
To install @rbx@ as a shortcut for @./shotgun/rubinius@:
rake install
== Prefix installs
To install rbx and the rubinius library in a different location, you can set
the PREFIX environment variable during build and install:
PREFIX=/opt/packages/rubinius rake build
PREFIX=/opt/packages/rubinius rake install
== Troubleshooting and platform-specific notes
Right now, the very best thing to do is to join the #rubinius IRC channel on
irc://irc.freenode.net. The forums here are an alternative method though the
response is probably not going to be as swift. We will try to collect tips
here, too.
=== 64-bit platforms
Currently mostly works on amd64 and Opteron. Other 64-bit platforms have not
been tested.
=== Mac OS X with macports
See http://sam.aaron.name/2007/9/22/rubinius-on-os-x/
=== Ubuntu
For the build to succeed you will need these packages:
* bison
* libglib2.0-dev
* libreadline5-dev
* libssl-dev
* zlib1g-dev