Search code examples
iphoneiosrubyipad

Running a Ruby interpreter on iPad


I'll be taking a trip soon with my iPad, without my laptop. I'd like to continue to tinker with Ruby while I'm on the road. I have an iPhone developer program membership, and I'm not interested in submitting this stuff to the app store.

I found the shinycocos project, which appears to embed a Ruby interpreter in an app. But I can't get it to run, and it seems pretty customized for running cocos2d stuff.

My first goal is to run an interactive command line like Try Ruby!. After that, I'd like to enter small programs in a UITextView and run them. I'd appreciate any clues, tips, or existing projects you might know of.


Solution

  • I'm now using mruby-web-irb, which meets the requirements stated.

    The project provides a Ruby interpreter in Safari (or Chrome) by compiling mruby into Javascript via emscripten. That sounds like a lot of complexity, but it just works.

    If you like this kind of thing, definitely check out the emscripten demos. Especially repl.it, an Online REPL for 15+ languages, including Ruby, Python, Lua, Scheme, Forth, and Basic.