在Ruby 1.9.3中安装debugger-linecache时出错
我需要一个项目的debugger-linecache版本1.0.1,并且在尝试安装时遇到以下错误。 
 trunk ☺ gem install debugger-linecache -v '1.0.1' Building native extensions. This could take a while... ERROR: Error installing debugger-linecache: ERROR: Failed to build gem native extension. /Users/jordanscales/.rvm/rubies/ruby-1.9.3-p194/bin/ruby extconf.rb checking for vm_core.h... no checking for vm_core.h... no Makefile creation failed ************************************************************************** No source for ruby-1.9.3-p194 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 --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/jordanscales/.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 Gem files will remain installed in /Users/jordanscales/.rvm/gems/ruby-1.9.3-p194/gems/debugger-linecache-1.0.1 for inspection. Results logged to /Users/jordanscales/.rvm/gems/ruby-1.9.3-p194/gems/debugger-linecache-1.0.1/ext/trace_nums/gem_make.out trunk ☺ 
任何帮助将非常感激,我一直在寻找,但无法find一个工作的解决scheme。
这可能会帮助你,它适合我
 gem install debugger-linecache -v '1.1.2' -- --with-ruby-include=$rvm_path/src/ruby-1.9.3-p286/ 
 此错误意味着选定的debugger版本不支持您当前的Ruby版本。 有两个解决scheme: 
-  通过bundle update debuggerdebuggergem。 新版本的debugger向后兼容旧的Ruby版本,所以这是修复它的最好方法。
- 降级你的Ruby版本。
 更新/安装gem debugger-ruby_core_source , 
 gem install debugger-ruby_core_source 
它已被纠正在这里: https : //github.com/cldwalker/debugger-ruby_core_source/pull/7
问题是我正在使用gemsets不正确。 我知道没有权限是一个问题,因为在RVM下,我不需要sudo来安装任何东西。
  rvm gemset use global ,然后一个bundle install做了伎俩。 
从下面的链接:
https://github.com/cldwalker/debugger/issues/50
我已经安装了gemrubydebug19和问题解决如下:
 $ bundle ... -> failed to build debugger-linecache $ gem install ruby-debug19 $ bundle ... -> all is fine 
 在我的情况下,问题直接与debugger-linecache没有关系。 试试升级debugger-ruby_core_source或者降级Ruby几个debugger-ruby_core_source 。 
 我已经执行了bundle update debugger-linecache 。 尽pipe我在Gemfile.lock中有最新版本,但debugger-ruby_core_source已经升级到1.1.5,debugger-linecache已经停止抱怨了。 
如果您使用的是rvm,那么确保path导致ruby,在rvm rubies文件夹中
$ rvm_path /ruby/ruby1.9.3-P448
gem install debugger-linecache -v'1.1.2' - --with-ruby-include = $ rvm_path / rubies / ruby-1.9.3-p448
我安装了debugger-ruby_core_source gem,基于在这里仔细阅读旧的答案: https : //github.com/cldwalker/debugger/issues/12
你的Gemfile.lock不是用你想绑定的Ruby来编写的。
  bundle update应该使Bundler看起来不同的版本。 
手动构build它。 它适用于我https://gist.github.com/4060260