Wolfmans Howlings

A programmers Blog about Programming solutions and a few other issues

Ruby 1.8.6 on Openmoko Freerunner

Posted by Jim Morris on Sun Aug 10 23:09:54 -0700 2008

I finally got around to building ruby 1.8.6 for my FR. I modified the ruby bitbake files that I found in the Mokomakefile openembedded directory. I am not sure how one actually is meant to do this, as the OE site is down and the docs don't explain it. So I just replaced the 1.8.5 ones with the 1.8.6 ones. I also managed to fix a bug in the 1.8.5 BB recipe that was causing socket to not build.

I also got the ruby dbus library to work, although I don't know what to do with it yet :)

So until I figure out how you are meant to add a new version to OE, I have put the ipk here.

If you want ruby 1.9 you can find it here

To install it just ssh into your FR and type

> wget http://blog.wolfman.com/files/ruby_1.8.6-p287-r1_armv4t.ipk
> opkg install ruby_1.8.6-p287-r1_armv4t.ipk

If you want to install gem then you need to ssh into the FR and do this...

> wget http://rubyforge.org/frs/download.php/38646/rubygems-1.2.0.tgz
> tar xzvf rubygems-1.2.0.tgz
> cd rubygems-1.2.0
> ruby setup.rb --no-rdoc --no-ri

I recommend you do the no doc and no ri otherwise it takes forever.

As for dbus...

> wget https://trac.luon.net/data/ruby-dbus/releases/ruby-dbus-0.2.1.tar.gz
> tar xzvf ruby-dbus-0.2.1.tar.gz
> cd ruby-dbus-0.2.1
> ruby setup.rb config
> ruby setup.rb setup
> ruby setup.rb install

look in the examples to see how to use it, I tries this...

> ruby examples/utils/listnames.rb --system
    org.freedesktop.DBus
    :1.3
    :1.4
    org.freedesktop.Avahi
    :1.0
    org.bluez
    :1.1
    :1.6
    :1.2
    org.freedesktop.Hal

So it seems to work.

Let me know what you do with it.

I also built jove, my favorite mini-emacs editor, this is just an executable just copy to /usr/bin Use instead of vi or nano.

UPDATE The bitbake recipe I used to build ruby 1.8.6 is here

Posted in Openmoko  |  Tags ruby,freerunner  |  3 comments

Comments

  1. Philip Rhoades said on Sun Sep 28 10:48:09 -0700 2008
    Wolfman,

    Thanks for that! - I have just got my Neo but I was already missing Ruby!

    Regards,

    Phil. (phil at pricom dot com dot au)
  2. rudi said on Mon Oct 05 01:47:19 -0700 2009
    "bug in the 1.8.5 BB recipe that was causing socket to not build."... could you give me the recipe patch?
  3. wolfman said on Mon Oct 05 23:51:53 -0700 2009
    If I remember the critical bit to enable sockets is this...

    EXTRA_OECONF= "--enable-wide-getaddrinfo"

    I added the bitbake recipe to the article.

(leave email »)