我正在尝试使用RinRuby gem,但是当我尝试启动我的rails服务器时,我收到以下错误:
in require': There was an error while trying to load the gem 'rinruby'.
(Bundler::GemRequireError)
Gem Load Error is: No such file or directory - R
Backtrace for gem load error is:
/Users/reinierverbeek/.rvm/gems/ruby-2.3.0/gems/rinruby-2.0.3/lib/rinruby.rb:164:in `popen'
/Users/reinierverbeek/.rvm/gems/ruby-2.3.0/gems/rinruby-2.0.3/lib/rinruby.rb:164:in `initialize'
/Users/reinierverbeek/.rvm/gems/ruby-2.3.0/gems/rinruby-2.0.3/lib/rinruby.rb:789:in `new'
我安装了R,我的.bash-profile文件如下所示:
PATH="/Library/Frameworks/Python.framework/Versions/3.5/bin:${PATH}”
export PATH
[[ -s "$HOME/.rvm/scripts/rvm" ]] && source "$HOME/.rvm/scripts/rvm" # Load RVM into a shell session *as a function*
export R_HOME="/Library/Frameworks/R.framework/Resources"
source ~/.profile
我添加了这个bash文件,因为我也注意到我无法使用Rscript从CLI执行R脚本,但我必须包含整个路径
"/Library/Frameworks/R.framework/Resources/Rscript"
我还尝试使用以下内容编辑我的路径:
PATH="/Library/Frameworks/Python.framework/Versions/3.5/bin:${PATH}:/Library/Frameworks/R.framework/Resources/Rscript”
但这没有帮助