`

Ruby on Windows Mobile 5 13

Posted by andry
on Wednesday, June 27

What’s good of mobile gadget if we only use it for PIM and answering phone? Try running Ruby and you’ll see limitless possibility.

In short, you only need 3 basic steps.

  1. Get a console running
  2. Grab and install appropriate ruby binary
  3. Have fun. Go mad.

Devil is in the detail. I’ll try to conduct an exorcism for you here below.

Get console running

WM5 doesn’t come with console (or shell or ‘command prompt’) out-of-the-box. Microsoft offers PPC Command Shell as a part of Windows Mobile Developer Power Toys. It’s made solely for PPC2003 and unfortunately I can’t hack it to run on WM5. So a viable alternatives is to get Pocket CMD with following steps:

HKEY_LOCAL_MACHINE\Drivers\Console\OutputTo". Set its value to “0”.

registry edit

Grab and install ruby-mswince.

The hardest part is that web is in japanesse.

Fear not. Arm distribution usually works. If your PDA’s processor is Intel, Xscale, TI Omap, Samsung then we can safely assume that it’s an arm processor. Or in plain english, if your PDA is 02 or Dopod or HP Ipaq, then it’s arm-powered.

Extract ruby-mswince in your desktop. Copy it into your PDA. I suggest in your root directory named \ruby.

Set PATH environment to include \ruby\bin. To make my life easier, I write it on a *.bat file.

set ruby path

Verify that Ruby works. Do a version check and print out Ruby environment setting.

ruby test drive

Have fun. Go mad.

Perform a vivid scream to entire universe: “Yattai!” :D

Oh by the way, why I the heck would I need ruby on my PDA?
So I can try Ruby on my bed.

ruby environment on my bed

Comments

Leave a response

  1. silentJune 27, 2007 @ 09:50 PM
    FLAD
  2. NJune 27, 2007 @ 10:36 PM
    02nya kewl. kira-kira iPhone bisa digituin juga gag yah?
  3. Armand du PlessisJune 28, 2007 @ 03:48 AM
    Great thanks! I saw the ruby-mswince site and they had the latest ruby builds there but since it was in japanese wasn't too sure whether it'll work so thanks for posting these steps.
  4. aditJune 29, 2007 @ 11:17 AM
    Oh by the way, why I the heck would I need ruby on my PDA? biar bisa ngoprek ruby pas lagi release somethin di WC kekekek :D tapi pak, kalo install gem, rake dan rails kira2 bisa ndak di pda ? sayang daku ndak bisa nyoba great tutorial ini... makelum lum punya PDA
  5. AndryJune 29, 2007 @ 02:50 PM
    Adit:
    Udah dicoba gem, ga bisa :). Tapi minimal ada irb dan ri untuk main-main ruby standard. Misalnya: ngecek feed planet-planet, ngurusi cron, bikin 'tail', 'merge', 'diff' dan lain-lain. Kebanyakan nyontek di "Everyday Scripting for Ruby" itu.
  6. dedenfJune 29, 2007 @ 04:31 PM
    beneran, FLAD!
  7. MaxJuly 20, 2007 @ 06:48 AM
    IRB is not accessible ?
  8. deckartjazzAugust 02, 2007 @ 08:41 AM
    Howdy! This is great I can get ruby to run via ruby -e and a single line of code. However how do I get it to work like: prompt>ruby hello.rb Whenever I do that it says: ruby: The device does not recognize the command. -- hello.rb (LoadError) Likewise if I do: ruby < hello.rb it just sits there. Any ideas or can you only do basic single line stuff??
  9. RudolphSeptember 04, 2007 @ 03:40 AM
    decartjazz, did you try using ruby -e 'require "myfile.rb"'
  10. akangazizOctober 21, 2007 @ 03:02 PM
    keren brur...
  11. pavelDecember 30, 2007 @ 05:05 PM
    genius! I must try this. unfortunetly I'm reading this off of my fone, in bed. irony?
  12. John SFebruary 24, 2008 @ 01:01 AM
    I've built the latest version of Ruby using the CEGCC Unix/Posix development toolset for Windows CE. It's currently at 1.8.6-p111, it doesn't appear to display the same wince::strerror problems that the existing WinCE binaries from uema2.s8.xrea.com do. It still has the problem of relative paths that makes the existing WinCE version of Ruby so annoying, but I'm close to getting rubygems working with it, so we may even see Rails working in the near future.... http://www.target-earth.net/gadgets/
  13. Leroy VargasMarch 25, 2008 @ 01:21 PM
    The Pocket Console and Pocket CMD links now point to a useless, rubbish Canon PowerShot page. Seems that Pocket Console/CMD have been removed.
Comment