Fetching contributors…
Cannot retrieve contributors at this time
155 lines (107 sloc) 5.39 KB


Please see LICENSES.txt in this directory.

Getting started

The simplest way to install and run MagLev is to use the installer available from the MagLev Discussion Google Group. This installer/updater creates a separate (sub)directory for each new version of MagLev.

If you want to participate in MagLev development, or just live on the bleeding edge, you can clone the MagLev github repository, i.e. `git clone git://` To use it, you need to run at least once. After that, everytime you do a 'git pull' you need to run to ensure you have the corresponding GemStone 3.x binaries. Otherwise, you might get version skew that prevents MagLev from running correctly. You'll have all the functionality of git, but unless you create a new clone for each release, you may be unable to revert to an earlier version.


Some prerequisites must be installed on your machine before MagLev can run correctly. For details, see the Prerequisites file in the docs directory.


To generate the HTML version of this and other documentation:

cd to the directory holding this README

$ rake rdoc

open html/index.html in your web browser of choice

Quick Start

Install MagLev

Once you've downloaded MagLev by running or, set your MAGLEV_HOME and PATH variables:

export MAGLEV_HOME=<path_to_the_directory_containing_this_README>

It can also be useful to put any frequently used MagLev options (like “-d” or “-MtraceLoad”) in the environment variable MAGLEV_OPTS so you don't have to type them on the command line, and executables like rackup, rake, etc. can use them without modifying those scripts.

export MAGLEV_OPTS="-d -MtraceLoad"

run “maglev-ruby –help” to see possible options.

Start the MagLev server

The server is started with rake:

$ rake maglev:start

Check status of MagLev server

To check that the MagLev Server started correctly, run rake maglev:status, or simply, rake:

$ rake maglev:status

If the server is not running, you'll see output like:

(in /congo1/users/monty/MagLev/MagLev-22152.Linux)
maglev not running

If a server is running, you'll see output like:

(in /congo1/users/monty/MagLev/MagLev-22152.Linux)
Status  Version    Owner    Pid   Port   Started     Type  Name
------ --------- --------- ----- ----- ------------ ------ ----
  OK   3.0.0     monty     26354 33413 Aug 19 11:32 Stone  maglev

maglev-ruby: Execute a Ruby file

You should now be able to run a simple ruby script:

$ cat > hello.rb
puts "Hello from MagLev"
$ maglev-ruby hello.rb
Hello from MagLev

maglev-irb: Open an interactive maglev shell

MagLev now includes a slightly modified copy of irb called maglev-irb. References in this documentation to maglev-irb currently apply to a deprecated maglev-irb version. We'll update the docs soon.

MagLev provides an IRB-like utility, $MAGLEV_HOME/bin/maglev-irb. It provides a minimal interactive environment with some limitations:

$ maglev-irb
>> 1 + 1
=> 2
*> puts "Hi"
=> nil
*> ^D

See maglev-irb for details.

Next Steps


You can try running the scripts in the examples directory.


A simple example that starts a webrick server which you can connect to at localhost:2000/. To run the script, make sure maglev-ruby is on your path, and then:

$ $MAGLEV_HOME/examples/webrick/time_server.rb

^C will terminate the webrick server VM.

Further reading

The following documentation explains more:

Release Notes

Notes on and limitations of the current release.


How to start and stop the MagLev server.


How to run MagLev in debug mode


Guide to the MagLev distribution file layout


Running mspec and rubyspecs with MagLev


Rake tasks for MagLev


MagLev interactive utility


Solutions for common problems


External software needed by MagLev

Persistence API

Persistence and transactions

Smalltalk FFI

GemStone Smalltalk FFI

MySQL Driver

MySQL driver


Ruby Benchmark Suite benchmarks


Sample Ruby apps we're testing in MagLev


  • set MAGLEV_HOME to the full path of this directory, and add $MAGLEV_HOME/bin to your PATH. Then you can use maglev-ruby etc. from anywhere.

Ruby code:

  • src/ and src/lib/ are both on the require path

  • src/kernel/ has the core Array, String etc. files