首页
学习
活动
专区
圈层
工具
发布
首页
学习
活动
专区
圈层
工具
MCP广场
社区首页 >问答首页 >安装调试器时出错:无法使用ruby-1.9.3-p362构建gem本机扩展

安装调试器时出错:无法使用ruby-1.9.3-p362构建gem本机扩展
EN

Stack Overflow用户
提问于 2012-12-28 03:56:31
回答 8查看 31K关注 0票数 27

在尝试为新项目运行bundle时,我遇到了以下错误:

代码语言:javascript
运行
复制
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文件的内容,它们没有什么意义,但如果需要,我会发布它们。

为什么这个不起作用?

EN

回答 8

Stack Overflow用户

回答已采纳

发布于 2012-12-31 21:10:56

我遇到了同样的问题。我试过了:

bundle update debugger

我的Gemfile是这样的:

gem 'debugger'

它起作用了,我不需要更改Gemfile。bundle的输出显示如下所示

...

Installing debugger-ruby_core_source (1.1.6)

Installing debugger-linecache (1.1.2) with native extensions

Installing debugger (1.1.4) with native extensions

...

票数 42
EN

Stack Overflow用户

发布于 2012-12-28 03:56:31

这个问题的解决方案是简单地安装调试器-ruby_source gem -a forked version of debugger-ruby_core_source by eiel on github

经过多次尝试和错误(对我而言),我只是

代码语言:javascript
运行
复制
gem install debugger-ruby_core_source -v '1.1.6'

这强制包含p362报头。然后,当我运行bundle时,使用本机扩展成功地构建了调试器,bundler继续它的快乐之路,我也是。

注意,虽然我已经简单地使用了几次,但在我真正得到简单的解决方案之前,我尝试了几种方法,花了几个小时才让它起作用。

票数 16
EN

Stack Overflow用户

发布于 2012-12-28 13:30:01

也许它最好使用捆绑包更新,在这里工作得很好。

$包更新调试器-ruby_core_source

考虑对所有调试器gem使用update:

$包更新调试器

票数 10
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/14060513

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档