rubyonbug
n22t.com

I compiled Ruby for the BUG! If you’d like to download it, there’s a link at the bottom of the page. It’s a tarball that can be extracted to the root of your bug. It puts a ruby installation in /usr/local/. You can keep reading to learn how I compiled it if it interests you.

The fine folks over at Bug Labs created an amazing device called the BUG. It’s a small computer with modules that can extend it’s abilities. Nearly everything in this bad boy is open source which is great. The system is not for beginners though, for the most part you need to develop your own software. Fortunately Bug Labs provides an excellent SDK that allows you to develop applications for it in Java.

I got my BUG. I love it. But there is a problem. I am no Java programmer.

Sure I could try to learn it, and yes I probably should. But I want Ruby. So I set about getting a Ruby implementation on it. Here’s what I did:

My primary platforms are Mac OS X and Open Solaris. This makes working with Poky and BUG very difficult. I used all kinds of branded zones, qemu setups, Darwin ports, etc to try to get this to work. I ended up spinning up an EC2 instance of Centos 5.2 (yech) so that I could have the proper GLIBC. After that it was as simple as getting the Poky SDK to build Ruby. I followed these instructions for cross compiling Ruby. I tried to do it with the most current release but had a lot of issues. Perhaps there is a wiser person out there that can help me. I ended up using the same version of Ruby (ruby-1.8.6-p111) that the author of that blog post used. Sure it’s like two years old, but it’s better than no Ruby at all!

This is hot off the presses so use at your own risk. In the future I’d like to build this with the newest release of Ruby and make it into an ipkg so it’s easy to install and remove.

You can install this on your BUG by downloading the tarball and untarring it at /. It places Ruby in /usr/local/. Please let me know how it goes. My email is dave at n22t.com. Good luck!

Files:
Take me back home
Pictures by flickr. Links by del.icio.us. Code by David Rocamora.