Ruby on OpenWRT
I made passing mention of Ruby on OpenWRT previously and it looks like it garnered some interest. I haven’t had much time to play with it lately, but I figured I can make what I have available so others with more time can play too.
All of this was done and tested against OpenWRT White Russion (RC3).
To build Ruby, you should first take a look at the OpenWRT Building Packages HOW TO and make sure you have a working build environment.
Then grab this tarball and decompress it into your packages directory. The Makefile and patches will build Ruby 1.8.3 without most of the binary modules and statically link the remaining binary modules. If you have different needs you will need to modify the ruby/patches/ruby_ext.patch files and line 33 of ruby/Makefile. I haven’t looked at Ruby 1.8.4 yet, but I’m guessing minimal work would be needed to adapt the Makefile for it to build (again, just guessing).
Once everything is the way you want it, just follow the directions in the HOW TO (err.. or type “make ruby-compile” at the root of the SDK). It doesn’t actually make an ipkg yet, but you end up with a working Ruby binary.
Or alternatively you can just download this binary: Ruby 1.8.3 for OpenWRT
For modules and the standard library, you can just copy the bits and pieces you need from a Ruby install (or the source).










March 25th, 2006 at 9:05 am
how about ruby on rails? i hear it can run on lighttpd with fastcgi. that would be sweet if openwrt can serve ruby/ror pages!
March 31st, 2006 at 10:47 pm
It would amazingly useful for running apps from the router itself. You could use Lighthttp, SQLite and a minimal ruby install for this.
Dunno. Must try it.
S