How to Get and Install SciRuby Components

Updated

SciRuby components are distributed as Ruby gems, and installation instructions for each component are available in the project's docs. The main library you'll likely install first is NMatrix, the linear algebra library, which has its own documentation page. Before you start, note the project's own warning: these gems have been tested but are not "battle-hardened," so if you plan to use them in mission-critical code, expect to encounter bugs.

What SciRuby Actually Provides

SciRuby is a collection of tools for scientific computing and data visualization in Ruby. According to the project's own status page, the released core is NMatrix, the linear algebra library, which supports both dense and sparse matrix storage. The project has also added tensor support, and lists visualization tools plus libraries for machine learning and linear mixed modelling.

Several plotting libraries exist at an experimental stage — Rubyvis, Plotrb, and Nyaplot — and the project states an interest in improving existing APIs such as Gnuplot. The stated short-term goals are improved visualization software and continued development of the linear algebra software (NMatrix and MDArray).

Installation: What the Official Sources Tell You

The site does not reproduce full install commands on the main page; instead it points you to the documentation:

  • General instructions for installing the various SciRuby components are in the project's docs.
  • NMatrix documentation has its own dedicated page.

This means the reliable path is: identify the component you want, then follow its documentation rather than guessing at commands. The site does not list specific gem names, version numbers, or dependency requirements beyond what is described above, so treat any command you find outside the official docs as unverified.

A Practical Sequence

  1. Confirm you have a working Ruby environment. SciRuby components are Ruby gems, so a functioning Ruby installation is the prerequisite. The site does not specify a minimum Ruby version.
  2. Decide which component you need. For matrix and linear algebra work, that is NMatrix. For plotting, the options listed are experimental (Rubyvis, Plotrb, Nyaplot) or API-improvement targets (Gnuplot).
  3. Go to the docs for that component. The main site directs you there rather than hosting the steps itself.
  4. Install and then verify with a small task. Because the project warns about bugs, test with something trivial before building on it — for example, construct a small dense matrix and a small sparse matrix and confirm both behave as expected.

Before You Commit to It

The most important thing the project says about readiness is its own caution: the gems "have been tested, but are not battle-hardened." The site gives deliberately extreme examples — a self-driving car or controlling an ARKYD 100 satellite — to make the point that mission-critical use should come with an expectation of bugs and a plan to handle them.

That framing is useful for deciding whether to install at all:

Your situation Reasonable approach
Exploring scientific computing in Ruby, prototyping, learning Install and experiment; bugs are tolerable
Production or safety-critical system Treat as unproven; budget for debugging or choose a more mature stack
Need sparse matrices specifically NMatrix is the documented option, since it covers dense and sparse storage
Need plotting now The listed libraries are experimental; expect API churn

Getting Help and Contributing

If you get stuck or want to shape the tools, the project points to a few channels:

  • Google Group — the site offers a subscription form for the SciRuby Google Group.
  • IRC — #sciruby on Freenode.net. The project notes the channel is most active during Google Summer of Code months, but generally a few people are around.
  • Issue trackers — the NMatrix issue tracker on GitHub is described as the best place to start if you want to contribute; there is also a general SciRuby issue tracker.
  • Full developer roster — available on the project wiki.

Licensing

SciRuby and NMatrix are available under the BSD three-clause license, so you can review the terms before adopting them in your own project.

The short version: install via the official docs, start with NMatrix if you need linear algebra, verify with a small test, and weigh the project's own "not battle-hardened" warning against how critical your use case is.