WIN x64上的ruby-debug-base19-0.11.26.gem

关于我的系统的信息:

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 ': 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 `' 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 

有什么问题??

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

 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 。 它似乎减少了其他调试gem的大量脂肪,加上它实际上很容易安装!

打开你的Gemfile

看看是否有这样的东西……

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

注释掉它,然后用’调试器’代替

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