Ruby Source Code in Org Mode


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]

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

| 25 | 5 |