emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Eric Schulte <schulte.eric@gmail.com>
To: Steve Harman <stvharman@gmail.com>
Cc: emacs-orgmode@gnu.org
Subject: Re: org-babel ruby 1.8 and 1.9
Date: Sun, 18 Sep 2011 20:45:14 -0600	[thread overview]
Message-ID: <87ehzd1c91.fsf@gmail.com> (raw)
In-Reply-To: <CAJ-7bJNp2HGxrNy4dKVYe-hPmw8Em+bW4KMt4vApCGT2DMLTjA@mail.gmail.com> (Steve Harman's message of "Sun, 18 Sep 2011 20:50:33 -0400")

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 <stvharman@gmail.com> 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’s 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

-- 
Eric Schulte
http://cs.unm.edu/~eschulte/

      reply	other threads:[~2011-09-19  2:45 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-09-19  0:50 Steve Harman
2011-09-19  2:45 ` Eric Schulte [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87ehzd1c91.fsf@gmail.com \
    --to=schulte.eric@gmail.com \
    --cc=emacs-orgmode@gnu.org \
    --cc=stvharman@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).