雖然嘗試了一個新的項目捆綁運行,我遇到了以下錯誤:錯誤安裝調試器:無法建立與紅寶石1.9.3-P362寶石原生擴展
Installing debugger (1.2.2) with native extensions
Gem::Installer::ExtensionBuildError: ERROR: Failed to build gem native extension.
C:/Ruby193/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
checking for rb_method_entry_t.called_id in method.h... no
checking for rb_control_frame_t.method_id in method.h... no
Makefile creation failed
**************************************************************************
No source for ruby-1.9.3-p362 provided with debugger-ruby_core_source gem.
**************************************************************************
*** 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
Gem files will remain installed in C:/Ruby193/lib/ruby/gems/1.9.1/gems/debugger-1.2.2 for inspection.
Results logged to C:/Ruby193/lib/ruby/gems/1.9.1/gems/debugger-1.2.2/ext/ruby_debug/gem_make.out
An error occured while installing debugger (1.2.2), and Bundler cannot continue.
Make sure that `gem install debugger -v '1.2.2'` succeeds before bundling.
運行gem install debugger -v '1.2.2'
產生相同結果。
我檢查了mkmf.log和gem_make.out文件的內容,它們沒什麼意義,但如果要求我會發布它們。
爲什麼不能正常工作?
如果'ruby -v'給你'2.x',可以考慮使用[byebug](https://github.com/deivid-rodriguez/byebug)來代替(正如[官方文檔中所述](https:/ /github.com/cldwalker/debugger#known-issues)*僅支持1.9.2和1.9.3 *)。 – Lucio
@Lucio,byebug「需要版本2.2.x」及以上版本。顯然,ruby 2.0用戶在完全冷靜的情況下被排除在有用的調試器之外(這絕對不是)。 – Otheus