Install MagLev

There are three ways to install MagLev:

Minimum Requirements

Install with Ruby Version Manager

RVM is useful if you want to compare behavior of various Ruby implementations or versions of MagLev. Install using:

rvm install maglev

See the rvm home page for details of using RVM.

RVM will automatically start a MagLev server when you rvm use maglev. That server is left running if you rvm use any_other_Ruby.

To stop your MagLev server:

rvm use maglev
maglev stop

Note: maglev stop will only stop the version of MagLev currently in use. If you’re using more than one, you’ll have to maglev stop each of them – e.g.

rvm use maglev-1.0.0
maglev stop
rvm use maglev-head
maglev stop

ProTip: To kill all the MagLev servers rather than shut them down gracefully, run ps -ef | grep /sys/stoned and kill the stoned processes that show up. It takes a short time before they shut down, as they do a bit of cleanup first.

Note: When running rake from MagLev, you cannot perform tasks which affect MagLev itself, like rake maglev:stop. You have to use the bin/maglev shell script instead.

Install from GitHub

This version is best for MagLev contributors and for developers who like to live on the bleeding edge or use git tools.

Create a new directory on a local (not NFS) file system to hold the MagLev source tree and other files. Change to that directory, then:

  1. Clone the MagLev github repository then set $MAGLEV_HOME and your $PATH

    git clone git://
    cd maglev
    export MAGLEV_HOME=$PWD
    export PATH="$PATH:$MAGLEV_HOME/bin"
  2. Install the VM. If this is the first time you’re installing MagLev, run:

    ./     # from the maglev directory

    Or, if you’ve already run on the machine, then you can use the upgrade script:

    ./     # from the maglev directory

To use MagLev, you need to run at least once. does everything does, but also does some initial configuration of your system to ensure MagLev’s shared caching and other features will work.

When you git pull, check whether the second digit in the MagLev version has changed. If it has you’ll need to run to ensure you don’t get version skew. We’ll tweet when an is needed. You don’t need to know a version number to update. The installer/updater figures that out from the version.txt file.

You’ll have all the functionality of git, but unless you create a new clone before each, you may be unable to revert to an earlier version. Why? The install/upgrade script creates a new copy of the MagLev data repository including persistent kernel code. The scripts make one level of backup, but we won’t be providing migration scripts quite yet.

Install a specific MagLev release

This retrieves a specific tested release of MagLev rather than the current development version.

  1. Go to the MagLev archive
  2. Download a standard MagLev release – e.g. MagLev-1.1beta2.tar.gz, or it’s equivalent git archive – e.g. MagLev-1.1beta2-git.tar.gz.
  3. Uncompress the archive, cd to the newly created directory, and follow the process in Install from GitHub starting from the export MAGLEV_HOME=$PWD step.