tags:

views:

767

answers:

1

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: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:646: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 '

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

A: 

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.

Slava Kravchenko