Install Ruby/Mathematica library

You have to de-compress archive and enter its top directory. Then follow under procedures;

  1. Prepare Mathematica as expected. To compile extension, Mathematica's library is needed. However this library provides an interface to communucate Mathematica on not only local machine but also networks.
  2. Find the path on which MathLink C library locates. You can use Mathematica Help Browser to find the path. Search the keyword ``MathLink'' and you find the path in the description about MathLink Developer's Kit in [ [Add-ons] ] [MathLink Libraries][System-Specific][platform][Installing].

    For example, in Unix, the MathLink(TM) library locates ordinary under the directory

    /usr/local/mathematica/AddOns/MathLink/DevelopersKits/

    . This directory may have subdirectory whose name is your machine's platform architecture.

    You may find the MathLink library and the header file in

    /usr/local/mathematica/AddOns/MathLink/DevelopersKits/...
    ...(YOURPLATFORM)/CompilerAdditions/

    . In installation this path is needed to create Ruby extension library. See also Mathematica Manual Getting Started Appendix 3., `Installation and File Layout', pp.44-45.

    (If you want to develop MathLink, we recommend to link to the library ``libML.a'' and the header file ``mathlink.h'' to your ordinarry development directories, e.g. /usr/local/lib/ and /usr/local/include/)

  3. Edit ./ext/mathlink/extconf.rb. You may have to modify only $MATHLINK as the path you already get on the process (2).
  4. Type some commands.

    $ ruby setup.rb config
    $ ruby setup.rb setup
    # ruby setup.rb install

    For more details of setup.rb, try "ruby setup.rb --help". To install in Unix, you do not have to become root but you set some options and set the environment RUBYPATH. See also Ruby documents.

If you meet some installation problems, please tell us problems and your environments. We welcome your comments and improvement.