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.
The Rhodes Framework contains a working Ruby implementation for the iPhone. You could try just writing your own simple IRB clone with Rhodes and see how that goes. You won't be able to get it through the App Store, of course, but you don't care about that, anyway.
As a next step, you could steal their build recipes and compile your own.
In the future, it will probably be possible to use MacRuby, but for the time being, everybody who works on MacRuby either works for Apple or has signed an NDA, so they aren't saying anything. However, the MacRuby lead developer once said that MacRuby's ahead-of-time compiler could in the future be used to "run Ruby on resource-constrained small-size mobile internet devices" without ever mentioning the i-word.
[Note that this will probably not allow you to run an interpreter on the device, rather you would statically compile your code natively and then upload it to the device. And the compiler does not support eval
, which is crucial for running something like IRB or even a full IDE on the device.]
At the moment, your best bet for a mobile Ruby IDE is probably Android.
There is an iPhone project which embeds a Ruby interpreter and provides a basic command line at https://github.com/takuma104/iphone-irb. I compiled it and could install in on an iPad without problems. Unfortunately the project seems to be abandoned, but a good starting point.
I would recommend - Textastics as code editor (it includes sync features - ftp, webdav... - and a web browser to test your web page) - jailbreak + openssh - iSSH for remote but also localhost connection. Provides a nice shell directly on the iPad - jailbreak + ruby 1.9 from Cydia (not fully working, I would try to build it myself) - then you create your application on desktop computer, install all gems that you need - rake gem:freeze (if I remenber well) to embbed all rails dependencies in the app folder - then put the whole on your iPad and see...
then you are a Rails developer in the wild :-D
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With