ruby-on-rails – RubyOnRails与gem rinruby错误

我正在尝试使用rin
ruby 2.0.3.

在我的Gemfile中:

gem 'rinruby', '~> 2.0.3'

当我执行bundle install时,我没有任何问题.但是当我执行时:

rake db:migrate

我有这个错误:

$rake db:create
rake aborted!
Bundler::GemRequireError: There was an error while trying to load the gem 'rinruby'.
/home/jerviver21/workspace_upworkruby/blog1/config/application.rb:7:in `<top (required)>'
/home/jerviver21/workspace_upworkruby/blog1/Rakefile:4:in `<top (required)>'
Errno::ENOENT: No such file or directory - R
/home/jerviver21/workspace_upworkruby/blog1/config/application.rb:7:in `<top (required)>'
/home/jerviver21/workspace_upworkruby/blog1/Rakefile:4:in `<top (required)>'
(See full trace by running task with --trace)

我正在使用Ubuntu 14.04和postgreSQL 9.4.7

这是我的Gemfile:

source 'https://rubygems.org'

#Buscar en rubygems.org las implementaciones que se necesiten
#Registro y autenticacion de usuarios
gem 'devise'

# Bundle edge Rails instead: gem 'rails', github: 'rails/rails'
gem 'rails', '4.1.5'
# Use postgresql as the database for Active Record
gem 'pg'
# Use SCSS for stylesheets
gem 'sass-rails', '~> 4.0.3'
# Use Uglifier as compressor for JavaScript assets
gem 'uglifier', '>= 1.3.0'
# Use CoffeeScript for .js.coffee assets and views
gem 'coffee-rails', '~> 4.0.0'
# See https://github.com/sstephenson/execjs#readme for more supported runtimes
# gem 'therubyracer',  platforms: :ruby

# Use jquery as the JavaScript library
gem 'jquery-rails'
# Turbolinks makes following links in your web application faster. Read more: https://github.com/rails/turbolinks
gem 'turbolinks'
# Build JSON APIs with ease. Read more: https://github.com/rails/jbuilder
gem 'jbuilder', '~> 2.0'
#rinruby
gem 'rinruby', '~> 2.0.3'

# bundle exec rake doc:rails generates the API under doc/api.
gem 'sdoc', '~> 0.4.0',          group: :doc

# Spring speeds up development by keeping your application running in the background. Read more: https://github.com/rails/spring
gem 'spring',        group: :development

# Use ActiveModel has_secure_password
# gem 'bcrypt', '~> 3.1.7'

# Use unicorn as the app server
# gem 'unicorn'

# Use Capistrano for deployment
# gem 'capistrano-rails', group: :development

# Use debugger
# gem 'debugger', group: [:development, :test]

最佳答案 我刚刚测试了在Ruby 2.4.0-dev上安装rinruby 2.0.3 gem.

首先,运行require’rinruby’给了我一个关于没有安装R的错误.

所以我按照these instructions在Ubuntu 14.04上安装R.

之后,要求成功了.

点赞