Ruby Source Code in Org Mode

Menu

Enable execution of ruby code in Org Mode files with the following require in your .emacs file:

(require 'ob-ruby)

You can then insert ruby code in your org file using the following tags:

#+BEGIN_SRC ruby
  a = 2 + 3
  b = 10 * 2
  [a + b, a]
#+END_SRC

Evaluate with C-c C-C … and voila, the result shows in the buffer:

#+RESULTS:
| 25 | 5 |