Ruby on the Sharp Zaurus

Overview and Introduction

I bought a Sharp Zaurus a week ago and soon discovered that people had put together Perl and Python packages for this great little gadget. Why not Ruby? I thought.

So I set about creating one. At first, I just dissected some binary packages from the Debian ARM distribution, deleted all the fluff, and then copied what was left over to my SD card. A few symlinks later, everything was running as expected.

Then, Vincent Fiack posted a script that he had put together to pull the latest version of Ruby from CVS, cross-compile that for the ARM architecture, and package it up. I made some minor adjustments to the build configuration section of the script to reflect that I would be installing onto the SD card rather than into RAM, and then set about the build process.

The resulting archive of Ruby presented here is a CVS snapshot of Ruby 1.7.3, taken on 4th August 2002. The Ruby binary is statically linked, to ease the installation somewhat.

Here we verify that the binary runs at all:

# uname -a
Linux localhost 2.4.6-rmk1-np2-embedix #1 Tue Jul 30 08:38:25 PDT 2002 armv4l unknown
# ruby -v
ruby 1.7.3 (2002-09-27) [arm-linux]

This version of Ruby expects to find its library files in /mnt/card/ruby:

# ruby -e 'puts $:'

For this reason, the version contained in this archive is only really suitable for installation onto an SD card, as the Zaurus mounts this on /mnt/card. cd into this directory and unpack the file:

tar xzvf ruby-zaurus-1.7.3-20020927.tar.gz

The Ruby binary and irb will install into /mnt/card/ruby/bin, so you should either create symlinks to this directory, move the binaries to somewhere in your $PATH or add this directory to your $PATH.

I've done minimal testing of this version, but it seems to work the way it should. Your mileage may vary.

Download Ruby for the Sharp Zaurus.