ruby - “运行失败跳转到方法定义”错误 : undefined method `current_line' for TextMate:Module

标签 ruby textmate

更新:我想通了。 Ctrl-F 仅在未选择我正在搜索的方法时有效。游标只需要在方法名中。

我刚升级到 TextMate2。

当我选择一个方法并使用 Ctrl+F 转到它的定义时,我得到:

> Failure running Jump to Method Definition

这是痕迹:

/Users/ilikepie/Library/Application Support/TextMate/Managed/Bundles/Ruby on Rails.tmbundle/Support/lib/rails/text_mate.rb:54:in `method_missing': undefined method `current_line' for TextMate:Module (NoMethodError)
    from /Users/ilikepie/Library/Application Support/TextMate/Managed/Bundles/Ruby on Rails.tmbundle/Support/bin/jump_to_method_definition.rb:13:in `initialize'
    from /Users/ilikepie/Library/Application Support/TextMate/Managed/Bundles/Ruby on Rails.tmbundle/Support/bin/jump_to_method_definition.rb:147:in `new'
    from /Users/ilikepie/Library/Application Support/TextMate/Managed/Bundles/Ruby on Rails.tmbundle/Support/bin/jump_to_method_definition.rb:147

我还可以选择“编辑命令”。这是“跳转至方法”定义的代码:

#!/usr/bin/env bash
[[ -f "${TM_SUPPORT_PATH}/lib/bash_init.sh" ]] && . "${TM_SUPPORT_PATH}/lib/bash_init.sh"

RUBYLIB="$TM_BUNDLE_SUPPORT/lib:$RUBYLIB"
"${TM_RUBY:=ruby}" -- "${TM_BUNDLE_SUPPORT}/bin/jump_to_method_definition.rb"

我是否缺少环境变量?

最佳答案

我想通了。 Ctrl-F 仅在未选择我正在搜索的方法时有效。游标只需要在方法名中即可。

关于ruby - “运行失败跳转到方法定义”错误 : undefined method `current_line' for TextMate:Module,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/17113461/

相关文章:

syntax-highlighting - Textmate 2 语言语法中匹配行但尊重单词边界

ruby-on-rails - 产生大量 Rack 应用程序的乘客

ruby - 如何使用 em_mysql2 解决 'connection is still waiting for a result' 错误

Ruby:方法莫名其妙地被覆盖并设置为零

Xcode 和 Scala

matlab - 在 TextMate 中运行 Octave

ruby - 自包含 ruby "binary"?

ruby - Nokogiri - 如何命名节点 `comment` ?

Python 脚本无法通过 TextMate 运行,但在 IDLE 和 Eclipse 中正常

textmate - 如何在textmate中更改文件类型