1

关于我的系统的信息:

ruby -v-> ruby​​ 1.9.3p125 (2012-02-16) [i386-mingw32]

gem -v-> 1.8.24


当我跑步时

bundle install

输出:

Fetching source index for http://rubygems.org/
Could not find ruby-debug-base19-0.11.26 in any of the sources

防火墙关闭

我下载了这个文件:ruby-debug-base19-0.11.26.gem

但是当我运行时:

gem install ruby-debug-base19-0.11.26.gem

输出:

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

        C:/RailsInstaller/Ruby1.9.3/bin/ruby.exe extconf.rb
checking for rb_method_entry_t.called_id in method.h... no
checking for rb_control_frame_t.method_id in method.h... no
*** 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:/RailsInstaller/Ruby1.9.3/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
extconf.rb:16:in `block in <main>': break from proc-closure (LocalJumpError)
        from C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/ruby_core_sour
ce-0.1.5/lib/ruby_core_source.rb:18:in `call'
        from C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/ruby_core_sour
ce-0.1.5/lib/ruby_core_source.rb:18:in `create_makefile_with_core'
        from extconf.rb:32:in `<main>'


Gem files will remain installed in C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9
.1/gems/ruby-debug-base19-0.11.26 for inspection.
Results logged to C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/ruby-debu
g-base19-0.11.26/ext/ruby_debug/gem_make.out

有什么问题??

4

2 回答 2

2

打开你的 Gemfile

看看有没有这样的...

gem 'ruby-debug19', :require => 'ruby-debug'

将其注释掉,并改用“调试器”

#gem 'ruby-debug19', :require => 'ruby-debug'
gem 'debugger'
于 2012-10-27T16:30:25.417 回答
2

您需要提供--with-ruby-include带有 的选项ruby-debug-base19。在你的情况下尝试:

gem install ruby-debug-base19-0.11.26.gem -- --with-ruby-include=C:/RailsInstaller/Ruby1.9.3/include/ruby-1.9.1/ruby-1.9.3-p125

或者看看debugger宝石。它似乎从其他调试 gem 中减少了很多脂肪,而且它实际上工作和安装很容易!

于 2012-05-07T02:47:24.477 回答