ruby-on-rails - jRuby bundle 安装错误

标签 ruby-on-rails ruby rubygems bundle jruby

Gem::Ext::BuildError: ERROR: Failed to build gem native extension.

/home/nikhil/.rvm/rubies/jruby-1.7.19/bin/jruby -r ./siteconf20151019-18379-17l4c3t.rb extconf.rb
/home/nikhil/.rvm/rubies/jruby-1.7.19/lib/ruby/shared/mkmf.rb:14: Use RbConfig instead of obsolete and deprecated Config.
mkmf.rb can't find header files for ruby at /home/nikhil/.rvm/rubies/jruby-1.7.19/lib/native/include/ruby/ruby.h

extconf failed, uncaught signal 1

Gem files will remain installed in /home/nikhil/.rvm/gems/jruby-1.7.19@mbiprint/gems/binding_of_caller-0.7.2 for inspection.
Results logged to /home/nikhil/.rvm/gems/jruby-1.7.19@mbiprint/extensions/universal-java-1.6/1.9/binding_of_caller-0.7.2/gem_make.out
An error occurred while installing binding_of_caller (0.7.2), and Bundler cannot
continue.
Make sure that `gem install binding_of_caller -v '0.7.2'` succeeds before
bundling.

谁能解决这个问题。使用 jRuby 作为 RVM 时出现此错误。谢谢。

最佳答案

binding_of_caller 不适用于 JRuby。查看README :

Only works in MRI Ruby 1.9.2, 1.9.3, 2.0, 2.1 and RBX (Rubinius)

There is experimental support for jruby 1.7.x, but it only works in interpreted mode (i.e. use the option -Djruby.compile.mode=OFF or append compile.mode=OFF to your .jrubyrc)

关于ruby-on-rails - jRuby bundle 安装错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/33210259/

相关文章:

ruby-on-rails - 由于命名空间冲突而无法测试 RSpec?

ruby-on-rails - 找不到 railsinstaller.org 网站,我现在该怎么办?

ruby-on-rails - 使用 Rails 中的命名空间类防止 "warning: toplevel constant B referenced by A::B"

ruby - Hash[] vs to_h,它们是否相同,如果相同,哪个更好?

html - Rails 使用复选框为帖子添加标签(多对多)

ruby - 如何从 gem 发送简单的邮件,而不需要 ActionMailer,但使用其配置(如果存在)?

ruby-on-rails - 从 Rails 应用程序中的 gem 重载 CSS 文件

ruby-on-rails - Rails3 - 如何获取 ActiveRecord 模型的所有属性和关联?

ruby-on-rails - 在 Rails 3 中运行 thumbs_up gem 时出现问题

ruby-on-rails - rails 2.3.11 的稳定 ruby​​gems 版本是什么?