【问题标题】:bundle install error with jRubyjRuby捆绑安装错误
【发布时间】:2015-10-19 08:51:19
【问题描述】:
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 时出现此错误。谢谢。

【问题讨论】:

    标签: ruby-on-rails ruby gem bundle jruby


    【解决方案1】:

    binding_of_caller 不适用于 JRuby。见README:

    仅适用于 MRI Ruby 1.9.2、1.9.3、2.0、2.1 和 RBX (Rubinius)

    和

    有对 jruby 1.7.x 的实验性支持,但它只能在解释模式下工作(即使用选项 -Djruby.compile.mode=OFF 或将 compile.mode=OFF 附加到您的 .jrubyrc)

    【讨论】:

      【解决方案2】:

      sudo gem install binding_of_caller -v '0.7.2' in terminal 然后回车,如果它不工作,然后进入 gemfile 在记事本中打开它并注释行(意味着放 # 号) binding_of_caller

      【讨论】:

      • 我都试过了。还是不走运。即使我没有在我的 Gemfile 中添加它,但是当我命令安装包时,它给出了上面列出的错误。
      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2013-12-14
      • 2017-02-21
      • 1970-01-01
      • 1970-01-01
      • 2013-09-05
      • 2021-12-28
      相关资源
      最近更新 更多