Rhodes: A Tool To Bring Ruby Apps to the iPhone

On December 16, 2008

rhodes-old-stuff.png InfoQ’s Werner Schuster reports on Rhodes, a new open source toolkit developed by Rhomobile that makes it possible to run Ruby applications on the iPhone, Windows Mobile devices, and the BlackBerry. Support for Symbian and Android is set to follow. The code is hosted on Github.

Rhodes works by packaging Ruby code with a Ruby interpreter honed for iPhone (or BlackBerry, etc, respectively) use. It’s uncertain how this works with Apple’s iPhone App Store policies, but developer Adam Blum told InfoQ:

To be compliant on the AppStore app developers can’t be downloading interpreted code on the fly from elsewhere. It is the app developer’s responsibility to be abiding, and if they do want to be violating there are much simpler ways to do it than embedding a Ruby interpreter and downloading Ruby code from elsewhere.

On the surface, it sounds as if getting into the App Store shouldn’t be a problem, but due to these tools being so new, Apple might find it difficult to analyze apps initially to see whether there’s potential for abuse (please write in to us with your successes / failures!). However, the iPhone-optimized Ruby interpreter does try and play it safe by disabling some features, such as eval. You also won’t be developing regular iPhone Cocoa apps using this technique (in the way you can develop full Cocoa apps with RubyCocoa or MacRuby). Rhodes applications are Web applications that run directly on the phone, so your views will be in HTML, etc.

0 responses to “Rhodes: A Tool To Bring Ruby Apps to the iPhone”

  1. victor says:

    does it allow to serve pages to oyher devices or is it strictly local? carrying a mobile webserver in the pocket opens some interesting possibilities up

  2. Peter Cooper says:

    I don’t know about Rhodes specifically, but running a Web server in order to sync data is a common operation of iPhone apps. Several apps I have allow you to use your desktop’s browser to log into them to copy data across, etc – so theoretically it’s possible.

  3. Eric Berry says:

    It seems that when building a Rhodes navigational app, there is no ability to utilize the core graphics within the iPhone. Is there a way to have the awesome ability to put ruby on the iPhone yet still maintain the things that seperate native iPhone apps from just really fast-loading iPhone webapps?

  4. Peter Cooper says:

    I’d say it’s theoretically possible to port, say, MacRuby to work on the iPhone and then work on the bridge to allow access to some of the iPhone API’s specifics, but.. it’d probably be a lot of work (and definitely well above my head).

  5. I’m not quite sure to understand the licensing terms (see https://www.rhomobile.com/index.php?option=com_content&view=article&id=61&Itemid=53) but it seems that you either have to open-source your code or get a commercial license (you have to contact them for the details).

    Can anyone confirm this ?

  6. Adam Blum says:


    Yes, its standard open source dual licensing under GPLv3. That is, you can either open source your app or purchase a commercial license. Our commercial license is a small percentage of your application revenue.

    Victor and Peter,

    We have a server component called RhoSync (also open source and on github) that handles all the syncing for you. You don’t need to write a sync server.

    Regarding “iPhone-specifics” we have several iPhone (and other device specific) capabilites now: GPS and PIM data. We have a roadmap to add just about anything you’d want to do very soon.

    Or you can just modify the Rhodes framework itself to add what you think is missing. This is orders of magnitude easier than attempting your own port (we can say that from experience)

    Finally, check out https://rhomobile.com/contest for our app development challenge: $10000 for the best mobile app.
    – Adam

  7. Valentin Treu says:

    What about using Rhodes in combination with (say) Gosu or Rubygame
    to develop Games for Smartphones ? Or in other words: Is it possible
    to skip the HTML part and deploy/run just a ruby (game) application ?
    That would be really cool and an interesting alternative to flash (that
    still isn’t available on the iPhone, as we know..).