'运行跳转到方法定义失败'错误:TextMate:Module的未定义方法`current_line'

时间:2013-06-14 16:46:17

标签: 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"

我错过了环境变量吗?

1 个答案:

答案 0 :(得分:0)

我明白了。 Ctrl-F仅在未选择我搜索的方法时有效。游标只需要是方法名称。