ruby-debug不会安装/构建本机扩展

前端之家收集整理的这篇文章主要介绍了ruby-debug不会安装/构建本机扩展前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。
搜索了高低的解决方案.我已经安装了linecache19和 ruby_core_source.

这两个命令都不会工作:

  1. gem install ruby-debug19
  2. gem install ruby-debug19 -- --with-ruby-include=/Users/benjohnson/.rvm/src/ruby-1.9.1-p378

这是我不断得到的错误

  1. Building native extensions. This could take a while...
  2. ERROR: Error installing ruby-debug19:
  3. ERROR: Failed to build gem native extension.
  4.  
  5. /Users/benjohnson/.rvm/rubies/ruby-1.9.1-p378/bin/ruby extconf.rb
  6. checking for rb_method_entry_t.body in method.h... no
  7. checking for vm_core.h... no
  8. checking for rb_method_entry_t.body in method.h... no
  9. checking for vm_core.h... yes
  10. checking for iseq.h... yes
  11. checking for insns.inc... yes
  12. checking for insns_info.inc... yes
  13. checking for eval_intern.h... yes
  14. creating Makefile
  15.  
  16. make
  17. gcc -I. -I/Users/benjohnson/.rvm/rubies/ruby-1.9.1-p378/include/ruby-1.9.1/i386-darwin10.4.0 -I/Users/benjohnson/.rvm/rubies/ruby-1.9.1-p378/include/ruby-1.9.1/ruby/backward -I/Users/benjohnson/.rvm/rubies/ruby-1.9.1-p378/include/ruby-1.9.1 -I. -DHAVE_VM_CORE_H -DHAVE_ISEQ_H -DHAVE_INSNS_INC -DHAVE_INSNS_INFO_INC -DHAVE_EVAL_INTERN_H -I/Users/benjohnson/.rvm/rubies/ruby-1.9.1-p378/include/ruby-1.9.1/ruby-1.9.1-p378 -fno-common -O2 -g -Wall -Wno-parentheses -fno-common -pipe -fno-common -o breakpoint.o -c breakpoint.c
  18. gcc -I. -I/Users/benjohnson/.rvm/rubies/ruby-1.9.1-p378/include/ruby-1.9.1/i386-darwin10.4.0 -I/Users/benjohnson/.rvm/rubies/ruby-1.9.1-p378/include/ruby-1.9.1/ruby/backward -I/Users/benjohnson/.rvm/rubies/ruby-1.9.1-p378/include/ruby-1.9.1 -I. -DHAVE_VM_CORE_H -DHAVE_ISEQ_H -DHAVE_INSNS_INC -DHAVE_INSNS_INFO_INC -DHAVE_EVAL_INTERN_H -I/Users/benjohnson/.rvm/rubies/ruby-1.9.1-p378/include/ruby-1.9.1/ruby-1.9.1-p378 -fno-common -O2 -g -Wall -Wno-parentheses -fno-common -pipe -fno-common -o ruby_debug.o -c ruby_debug.c
  19. ruby_debug.c: In function ruby_method_ptr’:
  20. ruby_debug.c:141: error: rb_method_entry_t undeclared (first use in this function)
  21. ruby_debug.c:141: error: (Each undeclared identifier is reported only once
  22. ruby_debug.c:141: error: for each function it appears in.)
  23. ruby_debug.c:141: error: method undeclared (first use in this function)
  24. ruby_debug.c:142: warning: implicit declaration of function rb_method_entry
  25. ruby_debug.c: In function debug_event_hook’:
  26. ruby_debug.c:719: error: rb_method_entry_t undeclared (first use in this function)
  27. ruby_debug.c:719: error: me undeclared (first use in this function)
  28. make: *** [ruby_debug.o] Error 1
  29.  
  30.  
  31. Gem files will remain installed in /Users/benjohnson/.rvm/gems/ruby-1.9.1-p378/gems/ruby-debug-base19-0.11.24 for inspection.
  32. Results logged to /Users/benjohnson/.rvm/gems/ruby-1.9.1-p378/gems/ruby-debug-base19-0.11.24/ext/ruby_debug/gem_make.out

有任何想法吗?我迷路了.谢谢.

解决方法

我有同样的问题(1.9.1和1.9.2).甚至试图安装0.11.23触发错误.我发现有必要:

>卸载宝石(我的所有版本):

宝石卸载ruby-debug-base19
>删除0.11.24目录(在我的情况下:〜/ .rvm / gems / ruby​​-1.9.2-p0 / gems / ruby​​-debug-base19-0.11.24 /)
>明确安装0.11.23:

gem install ruby​​-debug-base19 –version = 0.11.23

这是我得到的大部分解决方案:http://rails.brentsowers.com/2010_08_01_archive.html

另外,如果您使用Bundler:

直到我升级到最新的Bundler(1.0.2 => 1.0.7),因为它坚持安装ruby-debug-base19 v 0.11.24),我有问题.

在您的Gemfile中,确保已经固定了ruby-debug-base19的版本:

gem“ruby-debug-base19”,“0.11.23”,require =>零

猜你在找的Ruby相关文章