Skip to content

Latest commit

 

History

History
154 lines (109 loc) · 5.33 KB

File metadata and controls

154 lines (109 loc) · 5.33 KB

Please see LICENSES.txt[files/LICENSES_txt.html] in this directory.

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://github.com/MagLev/maglev.git` To use it, you need to run install.sh at least once. After that, everytime you do a ’git pull’ you need to run update.sh 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

Once you’ve downloaded MagLev by running installMaglev.sh or upgradeMaglev.sh, set your MAGLEV_HOME and PATH variables:

export MAGLEV_HOME=<path_to_the_directory_containing_this_README>
export PATH=$MAGLEV_HOME/bin:$PATH

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.

The server is started with rake:

$ cd $MAGLEV_HOME
$ rake maglev:start

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

$ cd $MAGLEV_HOME
$ 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

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

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

MagLev now includes a slightly modified copy of irb called maglev-irb.

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

Using Maglev.commit_transaction in maglev-irb is not supported.

If you get an error when starting maglev-irb, it’s likely something in your .irbrc is breaking maglev-irb. Try maglev-irb -f which will bypass loading your .irbrc.

You can try running the scripts in the examples[files/examples/README_rdoc.html] 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.

The following documentation explains more:

Release Notes

Notes on and limitations of the current release.

Server

How to start and stop the MagLev server.

Debug

How to run MagLev in debug mode

Layout

Guide to the MagLev distribution file layout

Specs

Running mspec and rubyspecs with MagLev

Rake

Rake tasks for MagLev

maglev-irb

MagLev interactive utility

Troubleshooting

Solutions for common problems

Prerequisites

External software needed by MagLev

Persistence API

Persistence and transactions

Smalltalk FFI

GemStone Smalltalk FFI

MySQL Driver

MySQL driver

Benchmarks

Ruby Benchmark Suite benchmarks

Applications

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.

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

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