【问题标题】:RVM + Ruby 1.9.1 + ruby-debug = error?RVM + Ruby 1.9.1 + ruby​​-debug = 错误?
【发布时间】:2026-02-14 15:40:01
【问题描述】:

我正在尝试在 TextMate 中的方法之间进行适当的导航。我很想把它们的清单放在抽屉里,但我想还没有这样的解决方案,对吧?因此,我试图设置RubyAMP 与通过RVM 安装的Ruby 1.9.1-p378 一起使用,但是遇到了一些麻烦。 RubyAMP 需要ruby-debug,这就是我尝试安装 gem 时得到的结果

$ rvm gem install ruby-debug
info: ruby-1.9.1-p378: ruby 1.9.1p378 (2010-01-10 revision 26273) [x86_64-darwin10] 
Building native extensions.  This could take a while...

ERROR:  Error installing ruby-debug:
    ERROR: Failed to build gem native extension.

/Users/andrei/.rvm/rubies/ruby-1.9.1-p378/bin/ruby extconf.rb
Can't handle 1.9.x yet
*** extconf.rb failed ***

但是,the gem page 表示它应该适用于 1.9.x。我该如何解决?

【问题讨论】:

  • 它没有帮助。我对Can't handle 1.9.x yet 感到困惑。是来自ruby-debug吗?或者它是另一个组件?

标签: ruby textmate gem rvm ruby-debug


【解决方案1】:

试试这个(来自https://rvm.io/support/troubleshooting):

rvm gem install ruby-debug19 -- --with-ruby-include="$rvm_src_path/ruby-1.9.1-p378/"

【讨论】:

  • 在我的例子中 $rvm_src_path 是未定义的。在您的 rvm 区域中搜索 vm_core.h,它的目录是您可能需要的目录。我的是 /usr/local/rvm/src/ruby-1.9.2-p180
  • ruby-debug19 需要 linecache19 和 linecache19 需要 Ruby 版本。 >= 1.9.2。你知道另一种解决方法吗?注意: rvm gem install linecahce19 -- --with-ruby-include="$rvm_src_path/ruby-1.9.1-p378/" 失败,因为需要 ruby​​ 1.9.2。感谢您的优势。
【解决方案2】:

最新的 ruby​​ 1.9.2-p0 可以顺利运行 gem install ruby-debug19

【讨论】:

    【解决方案3】:

    对于最新的 ruby​​ 1.9.2-preview3

    gem install ruby-debug19 -- --with-ruby-include="$rvm_src_path/ruby-1.9.2-preview3"
    

    【讨论】: