2

我在 Windows 7 上安装 ruby​​ 调试器并收到以下错误。在这个问题之前,我查看了以下帖子,它们不适合我,或者我明显误解了一些东西,请帮忙。

无法在 Windows 上安装 ruby​​-debug gem

错误:安装 ruby​​-debug-ide

$ gem install ruby-debug
Temporarily enhancing PATH to include DevKit...
Building native extensions.  This could take a while...
ERROR:  Error installing ruby-debug:
      ERROR: Failed to build gem native extension.
    c:/Ruby193/bin/ruby.exe extconf.rb
Can't handle 1.9.x yet
*** extconf.rb failed ***
Could not create Makefile due to some reason, probably lack of
necessary libraries and/or headers.  Check the mkmf.log file for more
details.  You may need configuration options.

  Provided configuration options:
    --with-opt-dir
    --without-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=c:/Ruby193/bin/ruby

Gem files will remain installed in c:/Ruby193/lib/ruby/gems/1.9.1/gems/linecache-0.46 for inspection.
Results logged to c:/Ruby193/lib/ruby/gems/1.9.1/gems/linecache-0.46/ext/gem_make.out

$ gem install ruby-debug19
   Temporarily enhancing PATH to include DevKit...
   Building native extensions.  This could take a while...
   ERROR:  Error installing ruby-debug19:
    ERROR: Failed to build gem native extension.

    c:/Ruby193/bin/ruby.exe extconf.rb
 checking for rb_method_entry_t.body in method.h... *** extconf.rb failed ***
 Could not create Makefile due to some reason, probably lack of
 necessary libraries and/or headers.  Check the mkmf.log file for more
 details.  You may need configuration options.

Provided configuration options:
    --with-opt-dir
    --without-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=c:/Ruby193/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
 c:/Ruby193/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 c:/Ruby193/lib/ruby/1.9.1/mkmf.rb:491:in `block in try_compile'
    from c:/Ruby193/lib/ruby/1.9.1/mkmf.rb:443:in `with_werror'
    from c:/Ruby193/lib/ruby/1.9.1/mkmf.rb:491:in `try_compile'
    from c:/Ruby193/lib/ruby/1.9.1/mkmf.rb:1002:in `block in have_struct_member'
    from c:/Ruby193/lib/ruby/1.9.1/mkmf.rb:790:in `block in checking_for'
    from c:/Ruby193/lib/ruby/1.9.1/mkmf.rb:284:in `block (2 levels) in postpone'
    from c:/Ruby193/lib/ruby/1.9.1/mkmf.rb:254:in `open'
    from c:/Ruby193/lib/ruby/1.9.1/mkmf.rb:284:in `block in postpone'
    from c:/Ruby193/lib/ruby/1.9.1/mkmf.rb:254:in `open'
    from c:/Ruby193/lib/ruby/1.9.1/mkmf.rb:280:in `postpone'
    from c:/Ruby193/lib/ruby/1.9.1/mkmf.rb:789:in `checking_for'
    from c:/Ruby193/lib/ruby/1.9.1/mkmf.rb:1001:in `have_struct_member'
    from extconf.rb:10:in `block in <main>'
    from c:/Ruby193/lib/ruby/gems/1.9.1/gems/ruby_core_source-0.1.5/lib/ruby_core_source.rb:18:in `call'
    from c:/Ruby193/lib/ruby/gems/1.9.1/gems/ruby_core_source-0.1.5/lib/ruby_core_source.rb:18:in `create_makefile_with_core'
    from extconf.rb:24:in `<main>'


  Gem files will remain installed in c:/Ruby193/lib/ruby/gems/1.9.1/gems/ruby-debug-base19-0.11.25 for inspection.
 Results logged to c:/Ruby193/lib/ruby/gems/1.9.1/gems/ruby-debug-base19-0.11.25/ext/ruby_debug/gem_make.out
4

0 回答 0