2015-10-19 193 views
1
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/[email protected]/gems/binding_of_caller-0.7.2 for inspection. 
Results logged to /home/nikhil/.rvm/gems/[email protected]/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時出現此錯誤。謝謝。與jRuby捆綁安裝錯誤

回答

3

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

0

sudo gem在終端中安裝binding_of_caller -v'0.7.2'並按回車鍵,如果不工作,則進入gemfile在記事本中打開它並註釋行(表示放置#號)binding_of_caller

+0

我試過了。仍然不幸運。即使我沒有在我的Gemfile中添加這個,但是當我命令進行捆綁安裝時,它會給出上面列出的錯誤。 – ART