从 Textmate 查找 Ruby RI 文档

发布于 08-01 13:15 字数 1533 浏览 5 评论 0原文

我在 Textmate 中查找 Ruby 文档时遇到问题。 我将 Ruby 1.9.1 安装到 /usr/local/bin,但是当我使用 Ctrl+H 使用 Ruby 包查找单词时,出现以下错误:

/Users/joshuaaburto/Library/Application Support/TextMate/Pristine Copy/Support/lib/web_preview.rb:101:警告:98 /usr/local/lib/ruby 处的“end”与“if”缩进不匹配/1.9.1/rdoc/ri/driver.rb:661:in initialize': 权限被拒绝 - /Users/joshuaaburto/.ri/cache/ActionController-Base (Errno::EACCES) 来自 /usr/local/ lib/ruby/1.9.1/rdoc/ri/driver.rb:661:in从 /usr/local/lib/ruby/1.9.1/rdoc/ri/driver.rb:661:in 打开write_cache' 来自 /usr/local/lib/ruby/1.9.1/rdoc/ri/driver.rb:507:increate_cache_for' 来自 /usr/local/lib/ruby/1.9.1/ rdoc/ri/driver.rb:469:in load_cache_for' from /usr/local/lib/ruby/1.9.1/rdoc/ri/driver.rb:648:in 块(2 级)在 select_methods' 中 /usr/local/lib/ruby/1.9.1/rdoc/ri/driver.rb:647:in each' 中 /usr/local/lib/ruby/1.9.1/rdoc/ri /driver.rb:647:ingrep' from /usr/local/lib/ruby/1.9.1/rdoc/ri/driver.rb:647:in block in select_methods' from /usr/ local/lib/ruby/1.9.1/rdoc/ri/driver.rb:646:ineach' 来自 /usr/local/lib/ruby/1.9.1/rdoc/ri/driver.rb:646 :in select_methods' from /usr/local/lib/ruby/1.9.1/rdoc/ri/driver.rb:624:inblock in run' from /usr/local/lib/ruby/ 1.9.1/rdoc/ri/driver.rb:590:in each' from /usr/local/lib/ruby/1.9.1/rdoc/ri/driver.rb:590:in运行' 来自 /usr/local/lib/ruby/1.9.1/rdoc/ri/driver.rb:300:in run' 来自 /usr/local/bin/ri:5:in'< /p>

谁能告诉我如何正确编辑 RI 权限或 Ruby textmate 包以使用文档功能?

I'm having trouble looking up documentation for Ruby in Textmate. I installed Ruby 1.9.1 to /usr/local/bin but when I use Ctrl+H to lookup a word using the Ruby bundle I get this error:

/Users/joshuaaburto/Library/Application Support/TextMate/Pristine Copy/Support/lib/web_preview.rb:101: warning: mismatched indentations at 'end' with 'if' at 98 /usr/local/lib/ruby/1.9.1/rdoc/ri/driver.rb:661:in initialize': Permission denied - /Users/joshuaaburto/.ri/cache/ActionController-Base (Errno::EACCES) from /usr/local/lib/ruby/1.9.1/rdoc/ri/driver.rb:661:inopen' from /usr/local/lib/ruby/1.9.1/rdoc/ri/driver.rb:661:in write_cache' from /usr/local/lib/ruby/1.9.1/rdoc/ri/driver.rb:507:increate_cache_for' from /usr/local/lib/ruby/1.9.1/rdoc/ri/driver.rb:469:in load_cache_for' from /usr/local/lib/ruby/1.9.1/rdoc/ri/driver.rb:648:inblock (2 levels) in select_methods' from /usr/local/lib/ruby/1.9.1/rdoc/ri/driver.rb:647:in each' from /usr/local/lib/ruby/1.9.1/rdoc/ri/driver.rb:647:ingrep' from /usr/local/lib/ruby/1.9.1/rdoc/ri/driver.rb:647:in block in select_methods' from /usr/local/lib/ruby/1.9.1/rdoc/ri/driver.rb:646:ineach' from /usr/local/lib/ruby/1.9.1/rdoc/ri/driver.rb:646:in select_methods' from /usr/local/lib/ruby/1.9.1/rdoc/ri/driver.rb:624:inblock in run' from /usr/local/lib/ruby/1.9.1/rdoc/ri/driver.rb:590:in each' from /usr/local/lib/ruby/1.9.1/rdoc/ri/driver.rb:590:inrun' from /usr/local/lib/ruby/1.9.1/rdoc/ri/driver.rb:300:in run' from /usr/local/bin/ri:5:in'

Could anyone advise me on how to properly edit the RI permissions or the Ruby textmate bundle in order to use the documentation feature?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

忘年祭陌2024-08-08 13:15:43

通过用空格替换“end”单词前面的制表符(以匹配第 98 行中“if”的“缩进符号”),可以轻松解决缩进问题。 只需编辑“/Users/joshuaaburto/Library/Application Support/TextMate/Pristine Copy/Support/lib/web_preview.rb”文件,第 101 行,如其所述。

然而,另一个问题出现了(至少对我来说):下次调用文档查找时 TextMate 会“冻结”(按 Ctrl-C 释放它)。 在 Ctrl-C“解冻”之后,TextMate 说:“旧式 plist 解析器错误:第 1 行出现意外字符“0x300”:/Applications/TextMate.app/Contents/SharedSupport/Support/lib/ui.rb:182

也许是这样是因为我这里没有用 ruby​​ 1.9.1 编译 Cocoa 或者其他什么。

The problem with the indentation can be easily solved by replacing the tab symbol in front of that 'end' word with spaces (to match the "indentation symbols" of 'if' in line 98). Just edit your "/Users/joshuaaburto/Library/Application Support/TextMate/Pristine Copy/Support/lib/web_preview.rb" file, line 101, as it says.

However, another problem arises there (with me, at least): TextMate "freezes" next time you invoke the documentation look-up (press Ctrl-C to release it). Following Ctrl-C "unfreezing", TextMate says: "Old-style plist parser error: Unexpected character '0x300' at line 1: /Applications/TextMate.app/Contents/SharedSupport/Support/lib/ui.rb:182

Maybe this is because I don't have Cocoa compiled with ruby 1.9.1 here or something.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文