Interpreters and Runtimes of Ruby

With different environments, you might decide to use different implementations of the Ruby interpreter, and there are a number of them to choose from. There are JavaScript implementations, mobile applications, Java Enterprise environments, and so on. Depending on the result you want to achieve with your application, changing the implementation can help you increase the application’s speed or boost its memory, for example. The default Ruby implementation is MRI, but it is notbest for all cases and environments. In this post, I present you the list of the current implementations of the Ruby interpreter, which will hopefully help you understand which ones are the best suitable for your project needs.

MRI (Matz’s Ruby Interpreter)

As I mentioned earlier, this is the default Ruby implementation, written by the creator team lead by Yukihiro Matsumoto. By default I mean, if a vendor by chance includes a version of Ruby as a part of software initially installed on the operating system, then MRI will be the implementation. This implementation gets sponsored by the core team, as well as other contributors who would like to see Ruby grow. Every Christmas, the developers release an update to MRI, often including some new language features.



This implementation has potential to gain popularity among the developers. It is a version of Ruby, which is implemented on top of JVM (Java Virtual Machine). This gives Ruby an opportunity to become yet another language that runs on JVM, except for Java. In this scenario, Ruby runs everywhere where Java would run. The implementation has its advantages, but it also lacks some of the features that Ruby has, which means it can only be perfect for certain projects, but not all possible scenarios. Some developers admit that switching to JRuby increased the performance of their applications.


This implementation of Ruby represents its embeddable version. With this implementation, you can apply Ruby as a scripting language, and even use it to program microcontroller boards. The other uses of mruby include building of iOS apps, embedding mruby into iOS apps to increase their performance, and giving users the access to an embedded scripting language. The variety of the devices with operational system is very broad today, and mruby promises to solve the problem by increasing performance multi-platform.



The goal of this implementation is to transform Ruby into JavaScript. If you are looking to write a Ruby web app, Opal will make it possible. If you use one Ruby interpreter and run the server-side Ruby code, Opal will be transforming this into JavaScript to run on the client side. Since Ruby’s syntax is also much easier than JavaScript, it makes it easier for programmers to add the necessary elements that would have otherwise been written with JavaScript, which they might or might not know.

From the list of the implementations that I have provided here, focus on the ones that are most suitable for the type of project you work on. For the most programmers nowadays, the preferable choice of implementation still is MRI, the default implementation of Ruby. If you are looking for a general purpose Ruby code, then MRI should be your first choice. However, if you are considering improving the performance of your application, or transforming Ruby into JavaScript, refer to the implementations apart from MRI. If your project has unique features that require additional features, alternatives of Ruby might be right what you are looking for. Ruby is a very flexible language, which is compatible with most environments. The updates and changes in the language regularly introduced by the core team require the developer to be flexible, as well. And this is where alternative implementations might give a hand.

Many programming languages define some elements, classes and instances, such as Booleans, integers or “null”, as primitives. Ruby, however, is object-oriented and it treats every value as an object. All variables in Ruby have connections to objects.

Leave a Reply

Your email address will not be published. Required fields are marked *