Source Code in Org Mode

To enable execution of ruby code in OrgMode files, put 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 is shown in the buffer

| 25 | 5 |

Consult the org-mode manual for more information.