Library not found RSRuby installation on OS X 10.7.4

I am trying to install RSRuby on my Mac. After the call:

sudo gem install rsruby

I get this error:

ERROR: Cannot find the R library, aborting.
*** extconf.rb failed ***
Could not create Makefile due to some reason, probably lack of
necessary libraries and/or headers.  Check the mkmf.log file for more
details.  You may need configuration options.

Provided configuration options:
    --with-opt-dir
    --with-opt-include
    --without-opt-include=${opt-dir}/include
    --with-opt-lib
    --without-opt-lib=${opt-dir}/lib
    --with-make-prog
    --without-make-prog
    --srcdir=.
    --curdir
    --ruby=/Users/xxxxx/.rvm/rubies/ruby-1.9.3-p194/bin/ruby
    --with-R-dir
    --with-R-include
    --without-R-include=${R-dir}/include
    --with-R-lib
    --without-R-lib=${R-dir}/lib
    --with-Rlib
    --without-Rlib

I am working on Mac OS X 10.7.4 and I installed R via the provided .pkg.

Any idea?

+2
source share
3 answers

For those who, in the same situation, simply do the following:

$ R_HOME=/Library/Frameworks/R.framework/Resources
$ gem install rsruby -- --with-R-dir=$R_HOME 
+3
source

I am running OS X 10.9.4 and it worked for me.

export R_HOME=/Library/Frameworks/R.framework/Resources
gem install rsruby -- --with-R-dir=$R_HOME --with-R-include=$R_HOME/include --with-R-lib=$R_HOME/lib
0
source

I am having this problem since I have not installed R on my mac (Yosemite) yet. I did it using

$ brew tap homebrew/science 
$ brew install gcc
$ brew install Caskroom/cask/xquartz
$ brew install r
0
source

All Articles