微信公众号搜"智元新知"关注
微信扫一扫可直接关注哦!

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

搜索了高低的解决方案.我已经安装了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 =>零

原文地址:https://www.jb51.cc/ruby/272373.html

版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。

相关推荐