What Is Ruboto?

Scott Moyer edited this page Jan 2, 2014 · 14 revisions

Ruboto is JRuby (a Java-based implementation of the Ruby programming language) on Android. Most Android development is done in Java. The goal of the Ruboto community is to make Ruby a first-class development language on Android, opening up all of the Java-based Android APIs to the Ruby programmer.


Most of the objectives of the Ruboto project have been met. You can ship Android applications developed using Ruboto. The primary limitation of Ruboto applications has been start up speed. Currently, our target (< 4 sec.) has been achieved on the latest generation of hardware. We will continue to improve this as new optimizations are uncovered.

###Reasons To Use Ruboto

  • You Prefer Ruby: Whether you have a significant investment in Ruby or you just need a more flexible programming language, programming in Ruby while still having access to Java provides significant benefits.

  • You Need a Rapid Development Environment: Ruby is an interpreted language. This allows you to run small sections of code without compiling and deploying a new application.

  • You're Learning Android: The Android API includes thousands of classes and tens of thousands of methods. Learning a new area of of the API takes time and significant experimentation. Ruboto allows you to explore and experiment in a rapid environment.

  • You Want To Develop Directly On a Device: You can already develop on your Android device through programs like AIDE, but this still requires a build and install sequence. Ruboto's IRB program allows you to interpret small sections of code or larger scripts directly on your device.

##Major Pieces of Ruboto

###The Ruboto Gem

Ruboto installs on your development machine as a Ruby gem:

sudo gem install ruboto

The primary result of installing the ruboto gem is a new command line script ruboto:

ruboto --version # Prints the version of your ruboto gem

Through ruboto you can:

  • Set up or check your development environment
  • Set up and/or launch an emulator
  • Generate a new Ruboto/Android application directory
  • Generate additional Ruboto components for your exisiting application
  • Update the Ruboto components of an existing application
  • Add JRuby to your existing application

###The Ruboto Core Application

Because JRuby is an interpreted language there must be a copy of JRuby on the Android device. Ruboto achieves this with Ruboto Core which provides a single copy of JRuby for use by all the Ruboto apps on the Android device. This makes life easier for the developer because individual apps are smaller and quicker to build and deploy. The first time a Ruboto app is installed on an Android device the user will be prompted to download and install Ruboto Core from the Google Play store. However, if you prefer, it is also possible with Ruboto to include the JRuby code directly within an application.

###The Ruboto IRB Application

Ruboto IRB is a separate application on the Google Play store. It offers you the ability to interact directly with JRuby's script container on your device. You can evaluate single lines of code or create/run full scripts. One of the demo scripts uses webrick to create a server, allowing you to interact with Ruboto on your device through a browser on your local network. For more information on Ruboto IRB, check out the Using Ruboto IRB to jump start development page.

Clone this wiki locally
You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.
Press h to open a hovercard with more details.