Friday, February 11, 2011

Ruby :: rsruby

On MAC OS

$ sudo gem install rsruby -- --with-R-home=/usr/lib/R --with-R-include=/usr/share/R/include --with-R-dir=/Library/Frameworks/R.framework/Resources/

After installation setup the R_HOME global variable

export R_HOME=/usr/bin/R


At IRB

>> require 'rsruby'
=> true
>> RSRuby.instance
cannot find system Renviron
Fatal error: unable to open the base package

3 comments:

  1. Right now you're pointing R_HOME to the binary
    In fact, R_HOME needs to point to the directory that contains etc/Renviron

    ReplyDelete
  2. irb(main):016:0> require 'rsruby'
    LoadError: no such file to load -- rsruby
    from /usr/lib/ruby/1.8/rubygems/custom_require.rb:31:in `gem_original_require'
    from /usr/lib/ruby/1.8/rubygems/custom_require.rb:31:in `require'
    from (irb):16
    from /usr/lib/ruby/1.8/rubygems.rb:575

    ReplyDelete
  3. I am running into this issue as well, did you ever get it resolved?

    ReplyDelete