emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [O] org-babel ruby 1.8 and 1.9


From: Eric Schulte
Subject: Re: [O] org-babel ruby 1.8 and 1.9
Date: Sun, 18 Sep 2011 20:45:14 -0600
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux)

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 <address@hidden> 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 via email to

[Prev in Thread] Current Thread [Next in Thread]