Matt Connolly's Blog

my brain dumps here…

Monthly Archives: February 2012

RVM in OpenIndiana revisited

I just went through the process of setting up RVM from scratch in a zone in OpenIndiana. I wrote previously about the gnu path problem, but didn’t write down any of the OpenIndiana dependencies. They are:

Installing RVM

To install RVM, you will need:

  1. curl certificates installed into /etc/curl/curlCA (not installed by default in a new zone)
  2. The following packages are required to install rvm:
    `# pkg install archiver/gnu-tar text/gawk text/gnu-grep pkg:/sfe.openindiana.org/developer/versioning/git`
    Note: This requires adding the “SFE” (Spec Files Extra) repository as a known publisher. If this is already set up in your global zone then the new non-global zone should inherit it.
  3. Set the PATH environment variable to include `/usr/gnu/bin` at the front, i.e.: in .bashrc
    `export PATH=/usr/gnu/bin:$PATH`

Building Ruby 1.8.7

You will additionally need the following packages installed to build ruby 1.8.7 using rvm:

`# pkg install runtime/gcc text/gnu-patch developer/library/lint system/header system/library/math/header-math file/gnu-coreutils`

Et voilá!

Installing Ruby Enterprise Edition also worked for me. But it’s installer requires another ruby to be installed first.

Problems

So far the following rubies / gems have had problems:

  • Ruby 1.9.3 does not build correctly. (1.9.2 does, though) See the illumos bug tracker: https://www.illumos.org/issues/1587
  • Passenger gem installs, but apache module fails to compile.

 

So it’s not yet a perfect world

Advertisements

TTCP, in Ruby

I’ve used the TTCP tcp test program from time to time, and am at present looking at some networking in Ruby. So why not have a look at porting that to ruby? So I did.

This has been built as a gem, which an executable ‘ttcp’ that will install in your gem’s bin folder. You can get the gem from here: http://rubygems.org/gems/ttcp

Or type: `gem install ttcp` at your terminal.

Source code is released under MIT license, and available on github: https://github.com/mattconnolly/ttcp

So far, I’ve tested it out on Mac and OpenIndiana in ruby 1.8.7, 1.9.3 and JRuby 1.6.5. I can’t seem to run the tests in JRuby, but it appears to work anyway.

Enjoy.