简体   繁体   English

从Textmate查找Ruby RI文档

[英]Ruby RI documentation lookup from Textmate

I'm having trouble looking up documentation for Ruby in Textmate. 我在Textmate中查找Ruby文档时遇到麻烦。 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: 我将Ruby 1.9.1安装到/ usr / local / bin,但是当我使用Ctrl+H使用Ruby捆绑包查找单词时,出现此错误:

/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:in open' 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:in create_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:in block (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:in grep' 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:in each' from /usr/local/lib/ruby/1.9.1/rdoc/ri/driver.rb:64 / Users / joshuaaburto / Library / Application Support / TextMate / Pristine Copy / Support / lib / web_preview.rb:101:警告:在'end'处的缩进与在/usr/local/lib/ruby/1.9处的'if'不匹配。 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:in /Users/joshuaaburto/.ri/cache/ActionController initialize': Permission denied - /Users/joshuaaburto/.ri/cache/ActionController-Base (Errno::EACCES) from /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' from /usr/local/lib/ruby/1.9.1/rdoc/ri/driver.rb:507:in /usr/local/lib/ruby/1.9.1/rdoc/ri/driver.rb:469 write_cache' from /usr/local/lib/ruby/1.9.1/rdoc/ri/driver.rb:507:in load_cache_for' from /usr/local/lib/ruby/1.9.1/rdoc/ri/driver.rb:648:in /usr/local/lib/ruby/1.9.1/rdoc/ri/driver.rb的select_method load_cache_for' from /usr/local/lib/ruby/1.9.1/rdoc/ri/driver.rb:648:in块(2级)中:647:在each' 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:in :647:在grep'从/usr/local/lib/ruby/1.9.1/rdoc/ri的/driver.rb:647: block in select_methods' from /usr/local/lib/ruby/1.9.1/rdoc/ri/driver.rb:646:in /usr/local/lib/ruby/1.9中.1 / rdoc / ri / driver.rb:64 6:in select_methods' from /usr/local/lib/ruby/1.9.1/rdoc/ri/driver.rb:624:in block 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 run' from /usr/local/lib/ruby/1.9.1/rdoc/ri/driver.rb:300:in run' from /usr/local/bin/ri:5:in ' 6:在select_methods' from /usr/local/lib/ruby/1.9.1/rdoc/ri/driver.rb:624:in中的select_methods' from /usr/local/lib/ruby/1.9.1/rdoc/ri/driver.rb:624:inselect_methods' from /usr/local/lib/ruby/1.9.1/rdoc/ri/driver.rb:624:inselect_methods' from /usr/local/lib/ruby/1.9.1/rdoc/ri/driver.rb:624:in :在select_methods' from /usr/local/lib/ruby/1.9.1/rdoc/ri/driver.rb:624:in中的运行中块中ri / driver.rb:590:在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:在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? 有人可以建议我如何正确编辑RI权限或Ruby textmate捆绑包以使用文档功能吗?

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). 缩进的问题可以很容易地解决,方法是用空格替换该“结束”单词前面的制表符(以匹配第98行中“ if”的“缩进符号”)。 Just edit your "/Users/joshuaaburto/Library/Application Support/TextMate/Pristine Copy/Support/lib/web_preview.rb" file, line 101, as it says. 只需编辑它的“ / Users / joshuaaburto / Library / Application Support / TextMate / Pristine Copy / Support / lib / web_preview.rb”文件,第101行即可。

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). 但是,那里又出现了另一个问题(至少与我有关):下次您调用文档查找时,TextMate“冻结”(按Ctrl-C释放它)。 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 Ctrl-C“解冻”之后,TextMate说:“旧式plist解析器错误:第1行出现意外的字符'0x300':/ 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. 也许这是因为我在这里没有用ruby 1.9.1编译可可。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM