jRuby 捆绑安装错误

bundle install error with 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)

sudo gem install binding_of_caller -v '0.7.2' 在终端中并回车,如果它不起作用则进入 gemfile 在记事本中打开它并评论行(表示放置 # 符号)binding_of_caller