无法安装ruby-debug-base19x gem

当我尝试使用RubyMine IDE安装ruby-debug-base19x gem来调试我的应用程序时,我收到了以下错误消息,有人可以帮助我吗?

我使用的是Mac OS X 10.7.4

/Users/danilobarsotti/.rvm/rubies/ruby-1.9.3-p194/bin/ruby extconf.rb checking for rb_method_entry_t.body in method.h... no checking for vm_core.h... no /Users/danilobarsotti/.rvm/gems/ruby-1.9.3-p194/gems/ruby_core_source-0.1.5/lib/ruby_core_source.rb:39: Use RbConfig instead of obsolete and deprecated Config. 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 compiling breakpoint.c compiling ruby_debug.c ruby_debug.c:24: error: conflicting types for 'rb_iseq_compile_with_option' /Users/danilobarsotti/.rvm/rubies/ruby-1.9.3-p194/include/ruby-1.9.1/ruby-1.9.3-p194/vm_core.h:505: error: previous declaration of 'rb_iseq_compile_with_option' was here ruby_debug.c: In function 'call_at_line_unprotected': ruby_debug.c:474: warning: implicit conversion shortens 64-bit value into a 32-bit value ruby_debug.c: In function 'filename_cmp': ruby_debug.c:538: warning: implicit conversion shortens 64-bit value into a 32-bit value ruby_debug.c:539: warning: implicit conversion shortens 64-bit value into a 32-bit value ruby_debug.c: In function 'optional_frame_position': ruby_debug.c:1695: warning: implicit conversion shortens 64-bit value into a 32-bit value ruby_debug.c: In function 'do_jump': ruby_debug.c:2310: warning: implicit conversion shortens 64-bit value into a 32-bit value ruby_debug.c: In function 'context_jump': ruby_debug.c:2378: warning: comparison between signed and unsigned ruby_debug.c:2392: warning: comparison between signed and unsigned make: *** [ruby_debug.o] Error 1 

编辑

当我尝试使用“RubyMine Gem Tools”(在RubyMine IDE中)安装gem时,我收到以下消息:

运行开发时出错:myproject:无法安装Gems。 未安装以下gem:/Applications/RubyMine.app/rb/gems/ruby-debug-base19x-0.11.30.pre10.gem:安装ruby-debug-base19x-0.11.30.pre10.gem时出错:错误:失败构建gem原生扩展。 /Users/danilobarsotti/.rvm/rubies/ruby-1.9.3-p194/bin/ruby extconf.rb检查method.h中的rb_method_entry_t.called_id … * extconf.rb失败*由于某种原因无法创建Makefile ,可能缺少必要的库和/或标题。 检查mkmf.log文件以获取更多详细信息。 您可能需要配置选项。 提供的配置选项: – with-opt-dir –with-opt-include –without-opt-include = $ {opt-dir} / include –with-opt-lib –without-opt-lib = $ {opt-dir} / lib –with-make-prog –without-make-prog –srcdir =。 –curdir –ruby = / Users / danilobarsotti / .rvm / rubies / ruby​​-1.9.3-p194 / bin / ruby​​ –with-ruby-dir –without-ruby-dir –with-ruby-include – -without-ruby-include = $ {ruby-dir} / include –with-ruby-lib –without-ruby-lib = $ {ruby-dir} / lib /Users/danilobarsotti/.rvm/rubies/ruby- 1.9.3-p194 / lib / ruby​​ / 1.9.1 / mkmf.rb:381:in try_do': The compiler failed to generate an executable file. (RuntimeError) You have to install development tools first. from /Users/danilobarsotti/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/mkmf.rb:491:in try_do': The compiler failed to generate an executable file. (RuntimeError) You have to install development tools first. from /Users/danilobarsotti/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/mkmf.rb:491:in try_do': The compiler failed to generate an executable file. (RuntimeError) You have to install development tools first. from /Users/danilobarsotti/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/mkmf.rb:491:in在try_compile’中的块​​来自/Users/danilobarsotti/.rvm/rubies/ruby -1.9.3-p194 / lib / ruby​​ / 1.9.1 / mkmf.rb:443:in with_werror' from /Users/danilobarsotti/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/mkmf.rb:491:in try_compile’来自/Users/danilobarsotti/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/mkmf.rb:1002:in block in have_struct_member' from /Users/danilobarsotti/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/mkmf.rb:790:in阻止来自/Users/danilobarsotti/.rvm/rubies/ruby-1.9 .3-p194 / lib / ruby​​ / 1.9.1 / mkmf.rb:284:在block (2 levels) in postpone' from /Users/danilobarsotti/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/mkmf.rb:254:in /Users/danilobarsotti/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/mkmf.rb:284:in block in postpone' from /Users/danilobarsotti/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/mkmf.rb:254:in open’ -1.9.3-P194 / LIB /ruby/ 1.9.1 /微米(mKm) f.rb:280: postpone' from /Users/danilobarsotti/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/mkmf.rb:789:in checking_for’来自/ Users / danilobarsotti /.rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/mkmf.rb:1001:in have_struct_member' from extconf.rb:6:in extconf.rb的have_struct_member' from extconf.rb:6:in来自extconf.rb的块中:31:in call' from extconf.rb:31:in在’from /Users/danilobarsotti/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/mkmf.rb:527:in with_cppflags' from extconf.rb:30:in call' from extconf.rb:31:in块中with_cppflags' from extconf.rb:30:in ‘Gem文件将保留在/Users/danilobarsotti/.rvm/gems/ruby-1.9.3-p194/gems/ruby-debug-base19x-0.11.30.pre10中进行检查。 结果记录到/Users/danilobarsotti/.rvm/gems/ruby-1.9.3-p194/gems/ruby-debug-base19x-0.11.30.pre10/ext/ruby_debug/gem_make.out / Users / danilobarsotti / Library / Preferences /RubyMine40/rb/linecache19-0.5.13.gem:安装linecache19-0.5.13.gem时出错:错误:无法构建gem原生扩展。 /Users/danilobarsotti/.rvm/rubies/ruby-1.9.3-p194/bin/ruby extconf.rb检查vm_core.h … * extconf.rb失败*由于某些原因无法创建Makefile,可能缺少必要的库和/或标题。 检查mkmf.log文件以获取更多详细信息。 您可能需要配置选项。 提供的配置选项: – with-opt-dir –with-opt-include –without-opt-include = $ {opt-dir} / include –with-opt-lib –without-opt-lib = $ {opt-dir} / lib –with-make-prog –without-make-prog –srcdir =。 –curdir –ruby = / Users / danilobarsotti / .rvm / rubies / ruby​​-1.9.3-p194 / bin / ruby​​ –with-ruby-dir –without-ruby-dir –with-ruby-include – -without-ruby-include = $ {ruby-dir} / include –with-ruby-lib –without-ruby-lib = $ {ruby-dir} / lib /Users/danilobarsotti/.rvm/rubies/ruby- 1.9.3-p194 / lib / ruby​​ / 1.9.1 / mkmf.rb:381:in try_do': The compiler failed to generate an executable file. (RuntimeError) You have to install development tools first. from /Users/danilobarsotti/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/mkmf.rb:506:in try_do': The compiler failed to generate an executable file. (RuntimeError) You have to install development tools first. from /Users/danilobarsotti/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/mkmf.rb:506:in try_do': The compiler failed to generate an executable file. (RuntimeError) You have to install development tools first. from /Users/danilobarsotti/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/mkmf.rb:506:in try_cpp’来自/Users/danilobarsotti/.rvm/rubies/ruby-1.9 .3-p194 / lib / ruby​​ / 1.9.1 / mkmf.rb:931: block in have_header' from /Users/danilobarsotti/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/mkmf.rb:790:in中的block in have_header' from /Users/danilobarsotti/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/mkmf.rb:790:inblock in have_header' from /Users/danilobarsotti/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/mkmf.rb:790:in阻止来自/Users/danilobarsotti/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/mkmf.rb:284:in block (2 levels) in postpone' from /Users/danilobarsotti/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/mkmf.rb:254:in open’来自/Users/danilobarsotti/.rvm/rubies /ruby-1.9.3-p194/lib/ruby/1.9.1/mkmf.rb:284:in block in postpone' from /Users/danilobarsotti/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/mkmf.rb:254:in /Users/danilobarsotti/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/mkmf.rb:280:in postpone' from /Users/danilobarsotti/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/mkmf.rb:789:in checking_for’来自/Users/danilobarsotti/.rvm/rubies/ruby-1.9 .3-p194 / lib / ruby​​ / 1.9.1 / mkmf.rb:930:在have_header' from extconf.rb:15:in have_header' from extconf.rb:15:in from from /Users/danilobarsotti/.rvm/gems/ruby-1.9.3-p194/gems/ruby_core_source-0.1.5/lib/ruby_core_source.rb:18:in call' from /Users/danilobarsotti/.rvm/gems/ruby-1.9.3-p194/gems/ruby_core_source-0.1.5/lib/ruby_core_source.rb:18:in来自extconf.rb的create_makefile_with_core:19:在”Gem文件中将保留在/Users/danilobarsotti/.rvm/gems/ruby-1.9.3-p194/gems/linecache19-0.5.13进行检查。 结果记录到/Users/danilobarsotti/.rvm/gems/ruby-1.9.3-p194/gems/linecache19-0.5.13/ext/trace_nums/gem_make.out

1)尝试从http://rubyforge.org/frs/?group_id=8883下载linecache19-0.5.13.gem和ruby-debug-base19-0.11.26.gem

2)gem install linecache19-0.5.13.gem

3)gem install ruby​​-debug-base19-0.11.26.gem – –with-ruby-include = [你的ruby源代码]或者你可以尝试gem install ruby​​-debug-base19x –pre

你可以试试

 gem install ruby-debug-ide19 

(根据维基 )。 这在OS X 10.7.4上为我安装,但你可能想给调试器 gem一个镜头( gem install debugger )。 与大多数ruby-debug *gem不同,它实际上是维护的。

只需从gems / gemset中删除所有与调试相关的gem,然后让RubyMine重新安装正确的gem。 为我工作。

@gamov的解决方案对我有用,只需让RubyMine安装调试所需的所有gem。

如果您自己安装所有gem,确保版本正确非常重要。

无论如何,这里是RubyMine调试我的代码真正需要的gem列表:

gem清单

  • bigdecimal(1.1.0)
  • debugger-ruby_core_source(1.2.3)
  • io-console(0.3)
  • json(1.5.5)
  • minitest 2.5.1)
  • 耙子(0.9.2.2)
  • rdoc(3.9.5)
  • ruby-debug-base19x(0.11.30.pre12)
  • ruby-debug-ide 0.4.17)

希望这会有所帮助,希望更多的人不必诉诸过去我们过去做过的旧方式。

在尝试使用RubyMine进行调试之前,请确保安装DevKit。 您应该能够从ruby安装程序页面获取DevKit(注意:不同的DevKit版本可用于不同的ruby版本)解压缩DevKit Zip文件并在您将DevKit解压缩到的目录中执行以下操作:’Ruby dk。 rb init”Ruby dk.rb install’

我有一个不同的问题,阻止我安装ruby-debug-base19x但导致不同的特定错误比danilodeveloper得到。 在这里提到它,因为那些有我问题的人可能会先找到这个问题:

RubyMine 5.4.3.2.1 [喜欢那个版本号]安装了一个版本的debugger-ruby_core_source gem(1.1.9),这个版本对于它想要的ruby-debug-base19x来说太旧了(0.11.30.pre12)和/或我正在使用的ruby(1.9.3-p484)。 解决方案是

 gem update debugger-ruby_core_source 

(将其带到1.3.2)并让RubyMine再次尝试安装ruby-debug-base19x,这是成功的。

我在rubymine中设置了错误的ruby版本; 在菜单栏中,转到“Rubymine” – >“preferences” – >“Ruby SDK and Gems”,并确保它指向您期望的Ruby版本。

在这里找到了这个想法: https : //stackoverflow.com/a/21056201/1462575