58

I need version 1.0.1 of debugger-linecache for a project, and I am facing the following error when trying to install.

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 ☺  

Any help would be extremely appreciated, I have been searching but cannot find a working solution.

4

10 回答 10

127

这可能对你有帮助,它对我有用

gem install debugger-linecache -v '1.1.2' -- --with-ruby-include=$rvm_path/src/ruby-1.9.3-p286/
于 2012-10-16T11:11:52.770 回答
100

此错误表示所选版本debugger不支持您当前的 Ruby 版本。有两种解决方案:

  1. 通过更新debuggergem bundle update debugger。新版本debugger与旧 Ruby 版本向后兼容,因此这是修复它的最佳方法。
  2. 降级您的 Ruby 版本。
于 2012-10-23T20:25:58.503 回答
34

更新/gem debugger-ruby_core_source安装

gem install debugger-ruby_core_source

它已在此处更正:https ://github.com/cldwalker/debugger-ruby_core_source/pull/7

于 2012-12-03T15:19:53.240 回答
5

问题是我错误地使用了 gemsets。我知道没有权限是个问题,因为在 RVM 下我不需要 sudo 来安装任何东西。

rvm gemset use global然后 abundle install成功了。

于 2012-06-07T19:15:58.447 回答
4

从以下链接:

https://github.com/cldwalker/debugger/issues/50

我已经安装了 gem ruby​​-debug19并为我解决了如下问题:

$ bundle
... -> failed to build debugger-linecache
$ gem install ruby-debug19
$ bundle
... -> all is fine
于 2014-01-30T19:42:38.460 回答
3

在我的情况下,问题与直接无关debugger-linecache。尝试debugger-ruby_core_source将 Ruby 升级或降级几个补丁级别。

我已经执行了bundle update debugger-linecache。虽然我在 Gemfile.lock 中有最新版本,debugger-ruby_core_source但已升级到 1.1.5 并且 debugger-linecache 已停止抱怨。

于 2012-11-19T18:34:13.217 回答
2

我安装了 debugger-ruby_core_source gem,基于在这里阅读旧答案:https ://github.com/cldwalker/debugger/issues/12

于 2013-03-25T18:26:48.057 回答
1

If you are using rvm, then make sure the path lead to ruby, in rvm its rubies folder

$rvm_path/rubies/ruby-1.9.3-p448

gem install debugger-linecache -v '1.1.2'  -- --with-ruby-include=$rvm_path/rubies/ruby-1.9.3-p448
于 2013-07-24T04:51:09.047 回答
1

您的 Gemfile.lock 不是用您尝试捆绑的相同 Ruby 编写的。

bundle update应该通过让 Bundler 查看不同的版本来工作。

于 2013-10-29T11:09:09.507 回答
0

手动构建它。它对我 有用 https://gist.github.com/4060260

于 2013-01-22T15:33:45.320 回答