在Ruby 1.9.3中安装debugger-linecache时出错

Jor*_*les 58 ruby gem rubygems ruby-1.9.3

我需要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 ?  
Run Code Online (Sandbox Code Playgroud)

任何帮助将非常感激,我一直在寻找,但找不到有效的解决方案.

小智 127

这对你有帮助,对我有用

gem install debugger-linecache -v '1.1.2' -- --with-ruby-include=$rvm_path/src/ruby-1.9.3-p286/
Run Code Online (Sandbox Code Playgroud)

  • 这解决了我.刚刚用p374替换了p286,这是我目前的补丁级别,我很高兴. (6认同)

rcr*_*ers 100

此错误意味着所选版本debugger不支持您当前的Ruby版本.有两种解决方案:

  1. debugger通过更新gem bundle update debugger.新版本debugger与旧的Ruby版本向后兼容,因此这是解决它的最佳方法.
  2. 降级您的Ruby版本.

  • 如果不奇怪,我会拥抱你. (5认同)
  • 即使在今天也是最合适的解 (2认同)

Pie*_*oux 34

更新/安装gem debugger-ruby_core_source,

gem install debugger-ruby_core_source
Run Code Online (Sandbox Code Playgroud)

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


Jor*_*les 5

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

rvm gemset use global然后一个bundle install伎俩.