ruby:安装调试器

时间:2012-10-05 00:25:25

标签: ruby rubygems

我无法安装调试器以在我的ruby文件中工作。任何人都可以看到问题所在吗?

我在file.rb的顶部'需要调试器'并在运行ruby file.rb

时遇到此错误
rubygems/custom_require.rb:36:in `require': cannot load such file -- debugger (LoadError)

我在我的系统上做了gem install debugger,但收到了此错误消息。

ERROR:  Error installing debugger:
    ERROR: Failed to build gem native extension.

        /Users/mm/.rvm/rubies/ruby-1.9.3-rc1/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-rc1 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=/Users/michaeljohnmitchell/.rvm/rubies/ruby-1.9.3-rc1/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环境时,我得到了

  • RUBYGEMS版本:1.8.10
    • RUBY VERSION:1.9.3(2011-09-23 patchlevel -1)[x86_64-darwin10.8.0]
    • 安装目录:/Users/michaeljohnmitchell/.rvm/gems/ruby-1.9.3-rc1@global
    • RUBY EXECUTABLE:/Users/michaeljohnmitchell/.rvm/rubies/ruby-1.9.3-rc1/bin/ruby
    • 可执行目录:/Users/michaeljohnmitchell/.rvm/gems/ruby-1.9.3-rc1@global/bin
    • RUBYGEMS PLATFORMS:
    • 红宝石
    • x86_64的-达尔文-10
    • GEM路径:
      • /Users/mm/.rvm/gems/ruby-1.9.3-rc1@global
    • GEM配置:
      • :update_sources =>真
      • :verbose =>真
      • :benchmark =>假
      • :backtrace =>假
      • :bulk_threshold => 1000
      • :sources => [“http://rubygems.org/”,“http://gems.github.com/”]
    • 远程来源:

1 个答案:

答案 0 :(得分:3)

您正在使用调试器不支持的旧版预发布版本的Ruby。 Ruby 1.9.3的实际发布版本已经推出一段时间了,升级到Ruby 1.9.3-p194(调试器支持)将允许它安装。