我搜索了高低的解决方案.我已经安装了linecache19和
ruby_core_source.
这两个命令都不会工作:
gem install ruby-debug19 gem install ruby-debug19 -- --with-ruby-include=/Users/benjohnson/.rvm/src/ruby-1.9.1-p378
这是我不断得到的错误:
Building native extensions. This could take a while... ERROR: Error installing ruby-debug19: ERROR: Failed to build gem native extension. /Users/benjohnson/.rvm/rubies/ruby-1.9.1-p378/bin/ruby extconf.rb checking for rb_method_entry_t.body in method.h... no checking for vm_core.h... no checking for rb_method_entry_t.body in method.h... no checking for vm_core.h... yes checking for iseq.h... yes checking for insns.inc... yes checking for insns_info.inc... yes checking for eval_intern.h... yes creating Makefile make 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 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 ruby_debug.c: In function ‘ruby_method_ptr’: ruby_debug.c:141: error: ‘rb_method_entry_t’ undeclared (first use in this function) ruby_debug.c:141: error: (Each undeclared identifier is reported only once ruby_debug.c:141: error: for each function it appears in.) ruby_debug.c:141: error: ‘method’ undeclared (first use in this function) ruby_debug.c:142: warning: implicit declaration of function ‘rb_method_entry’ ruby_debug.c: In function ‘debug_event_hook’: ruby_debug.c:719: error: ‘rb_method_entry_t’ undeclared (first use in this function) ruby_debug.c:719: error: ‘me’ undeclared (first use in this function) make: *** [ruby_debug.o] Error 1 Gem files will remain installed in /Users/benjohnson/.rvm/gems/ruby-1.9.1-p378/gems/ruby-debug-base19-0.11.24 for inspection. 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 =>零