简体   繁体   English

ri + rvm + Textmate 的问题

[英]Problem with ri + rvm + Textmate

I'm trying to lookup help for Ruby methods in Textmate through the Ctrl+H shortcut, but I'm always getting this error:我正在尝试通过 Ctrl+H 快捷方式在 Textmate 中查找 Ruby 方法的帮助,但我总是收到此错误:

/Users/tomdeleu/.rvm/rubies/ruby-1.9.2-p180/lib/ruby/site_ruby/1.9.1/rubygems.rb:388:in bin_path': can't find gem rdoc ([">= 0"]) with executable ri (Gem::GemNotFoundException) from /Users/tomdeleu/.rvm/gems/ruby-1.9.2-p180/bin/ri:19:in ' /Users/tomdeleu/.rvm/rubies/ruby-1.9.2-p180/lib/ruby/site_ruby/1.9.1/rubygems.rb:388:in bin_path': can't find gem rdoc ([">= 0"]) with executable ri (Gem::GemNotFoundException) from /Users/tomdeleu/.rvm/gems/ruby-1.9.2-p180/bin/ri:19:in

Platform:平台:

  • MacOS X 10.6.8 macOS X 10.6.8
  • RVM 1.6.20 RVM 1.6.20
  • Textmate 1.5.10 (1631) Textmate 1.5.10 (1631)
  • TM_RUBY set to /Users/tomdeleu/.rvm/bin/rvm-auto-ruby TM_RUBY 设置为 /Users/tomdeleu/.rvm/bin/rvm-auto-ruby
  • installed osx-plist update as detailed in the RVM integration docs安装了 osx-plist 更新,如RVM 集成文档中所述
  • installed DrNic's Rails bundle安装DrNic 的 Rails 包

Ri works fine from the command-line (I ran "rvm docs generate" to install docs for 1.9.2). Ri 在命令行中运行良好(我运行“rvm docs generate”来安装 1.9.2 的文档)。 I've searched around but can't find a solution.我四处寻找,但找不到解决方案。 Can anyone help?任何人都可以帮忙吗?

After a lot of searching (and asking) around, solved it by reinstalling both Textmate (including delete of all customizations), and Ruby 1.9.2 (through RVM).经过大量搜索(和询问)后,通过重新安装 Textmate(包括删除所有自定义项)和 Ruby 1.9.2(通过 RVM)解决了这个问题。
Afterwards I installed the osx-plist update + some bundles again.之后我再次安装了 osx-plist update + 一些包。 Note that the osx-plist update (as detailed here ) should be done with system Ruby, not a Ruby 1.9, otherwise other errors occur.请注意,osx-plist 更新(详见此处)应使用系统 Ruby,而不是 Ruby 1.9 完成,否则会出现其他错误。
Also in Textmate make sure the PATH variable does not have a custom Ruby before your system Ruby.同样在 Textmate 中,确保 PATH 变量在您的系统 Ruby 之前没有自定义 Ruby。
With these settings, everything works fine now.有了这些设置,现在一切正常。 Hopefully this is useful to anyone encountering this error in the future...希望这对将来遇到此错误的人有用...

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

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