From mboxrd@z Thu Jan 1 00:00:00 1970 From: Eric Schulte Subject: Re: org-babel ruby 1.8 and 1.9 Date: Sun, 18 Sep 2011 20:45:14 -0600 Message-ID: <87ehzd1c91.fsf@gmail.com> References: Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([140.186.70.92]:59778) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1R5TrI-0005mD-Jd for emacs-orgmode@gnu.org; Sun, 18 Sep 2011 22:45:25 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1R5TrG-0004OZ-UT for emacs-orgmode@gnu.org; Sun, 18 Sep 2011 22:45:24 -0400 Received: from mail-yx0-f169.google.com ([209.85.213.169]:33668) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1R5TrG-0004OR-QX for emacs-orgmode@gnu.org; Sun, 18 Sep 2011 22:45:22 -0400 Received: by yxi19 with SMTP id 19so4506531yxi.0 for ; Sun, 18 Sep 2011 19:45:21 -0700 (PDT) In-Reply-To: (Steve Harman's message of "Sun, 18 Sep 2011 20:50:33 -0400") List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: Steve Harman Cc: emacs-orgmode@gnu.org Hi Steve, You should be able to customize the value of the org-babel-ruby-command variable to control what external executable is called by ruby code blocks. The default value of that variable is simply "ruby" but presumably setting that variable to the name of the ruby 1.9 executable should work. Note that for code blocks which use a session (see the session header argument for more information) all execution is handled by inf-ruby, and the inf-ruby package controls which executable is used. Hope this helps Best -- Eric Steve Harman writes: > Hello, > > On my mac, I have rvm installed with ruby 1.9.2 being default. > On the terminal, if I execute ruby, it is always 1.9.2 version. > However, the ruby ran by org-babel is 1.8 version. > How can I make the ruby code blocks in my org files > executed by 1.9? > > Since I am new to Emacs, I would appreciate your help. > I found org-mode and org-babel extremely helpful in preparing > course notes. That's why, in fact, I switched to Emacs. > In an attempt to solve the above problem, I installed rvm.el > and put it in my init.el right before loading the org-babel languages. > > (add-to-list 'load-path "/Users/stvharman/.emacs.d/lisp/rvm") > (require 'rvm) > (rvm-use-default) ;; use rvm=E2=80=99s default ruby for the current Emacs= session > > (org-babel-do-load-languages > 'org-babel-load-languages > '( > (R . t) > (ruby . t) > )) > > Thank you in advance. > > Have a nice weekend (and week ahead), > > Steve --=20 Eric Schulte http://cs.unm.edu/~eschulte/